添加俄语版本

This commit is contained in:
浅念
2025-04-08 09:30:48 +08:00
parent 9c93214b0f
commit 8beda0c969
16 changed files with 91 additions and 51 deletions
+3 -2
View File
@@ -23,8 +23,9 @@ import Eyu from '@/common/locales/ru.js';
// 引入并使用vue-i18n
import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
console.log(uni.getLocale())
let i18nConfig = {
locale: uni.getLocale(),// 获取已设置的语言
locale: uni.getStorageSync('i18locale')?uni.getStorageSync('i18locale'):uni.getLocale(),// 获取已设置的语言
messages: {
// 这里的属性名是任意的,您也可以把zh设置为cn等,只是后续切换语言时
// 要标识这里的语言属性,如:this.$i18n.locale = zh|en|cn|xxx
@@ -36,7 +37,7 @@ let i18nConfig = {
// 构造i18n对象
const i18n = new VueI18n({
// 默认语言,这里的local属性,对应message中的cn、en属性
locale:uni.getLocale(),
locale:uni.getStorageSync('i18locale')?uni.getStorageSync('i18locale'):uni.getLocale(),
// 引入语言文件
messages: {
// 这里的属性名是任意的,您也可以把zh设置为cn等,只是后续切换语言时