配置文件

This commit is contained in:
浅念
2025-03-20 17:36:42 +08:00
parent 021ffc6052
commit bb97b08003
5 changed files with 32 additions and 8 deletions
+3 -2
View File
@@ -28,16 +28,17 @@ Vue.use(VueI18n)
// 构造i18n对象
const i18n = new VueI18n({
// 默认语言,这里的local属性,对应message中的cn、en属性
locale: 'zh',
locale: 'zh-Hans',
// 引入语言文件
messages: {
// 这里的属性名是任意的,您也可以把zh设置为cn等,只是后续切换语言时
// 要标识这里的语言属性,如:this.$i18n.locale = zh|en|cn|xxx
'zh': Chinese,
'zh-Hans': Chinese,
'en': English,
'ru': Eyu,
}
})
uni.setStorageSync('i18locale', 'zh-Hans');
App.mpType = 'app'
Vue.prototype._i18n = i18n
const app = new Vue({