fix: i18n修改

This commit is contained in:
2023-11-24 13:27:57 +08:00
parent 460992d258
commit be5c7c5858
8 changed files with 28 additions and 17 deletions

View File

@@ -1,10 +1,9 @@
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import locale from 'element-ui/lib/locale'
import zh from './langs/zh-CN'
import en from './langs/en'
import id from './langs/id'
import indonesian from './langs/in'
import zh from './langs/chinese'
import en from './langs/english'
import indonesian from './langs/indonesian'
Vue.use(VueI18n)
const messages = {
en: {
@@ -13,9 +12,6 @@ const messages = {
zh: {
...zh
},
id: {
...id
},
in: {
...indonesian
}
@@ -25,7 +21,7 @@ const i18n = new VueI18n({
messages,
silentTranslationWarn: true, // 解决vue-i18n黄色警告"value of key 'xxx' is not a string"和"cannot translate the value of keypath 'xxx'.use the value of keypath as default",可忽略
globalInjection: true, // 全局注入
fallbackLocale: 'en'
fallbackLocale: 'zh'
})
locale.i18n((key, value) => i18n.t(key, value))
export default i18n