|
@ -22,7 +22,7 @@ const messages = { |
|
|
...enLocale, |
|
|
...enLocale, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
console.log(localStorage.getItem("browserLanguage")) |
|
|
|
|
|
const i18n = new VueI18n({ |
|
|
const i18n = new VueI18n({ |
|
|
messages, |
|
|
messages, |
|
|
fallbackLocale: "zh-CN", // 匹配不到时默认的语言
|
|
|
fallbackLocale: "zh-CN", // 匹配不到时默认的语言
|
|
@ -46,4 +46,5 @@ const translate = (localeKey) => { |
|
|
return localeKey |
|
|
return localeKey |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export { i18n, messages, translate } |
|
|
export { messages, translate } |
|
|
|
|
|
export default i18n |