[vue-i18n] Fall back to translate the keypath 'depo.method' with 'en-US' locale.
- 主要語言
- Vue
- 星號
- 17.5k
- 分支
- 3.6k
- PR 合併指標
- 30 天內沒有已合併 PR
描述
[vue-i18n] Fall back to translate the keypath 'depo.method' with 'en-US' locale.
locale zh-CN

const i18n = new VueI18n({
locale: cookie.get('lang'),
messages: {
'zh-CN': require('./common/lang/cn'), // 中文语言包
'en-US': require('./common/lang/en') // 英文语言包
}
})
mounted () {
if (cookie.get('lang') === '0') {
this.locale = 'en-US'
this.lang = '中文'
} else {
this.locale = 'zh-CN'
this.lang = 'ENG'
}
cookie.set('lang', this.locale === 'en-US' ? '0' : '1', 1)
},
watch: {
locale (val) {
this.$i18n.locale = val
console.log('locale', val)
}
},

本地有cookie, 为1,函数是 lang=1的时候,locale是中文,但是它还是返回到用英文。
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。