mirror of
https://github.com/EasyTier/EasyTier.git
synced 2024-11-16 11:42:27 +08:00
🐞 fix: i18n 读写 key 不一致
This commit is contained in:
parent
e9a625ec5f
commit
8188585edd
|
@ -36,7 +36,7 @@ const router = createRouter({
|
||||||
app.use(router)
|
app.use(router)
|
||||||
app.use(createPinia())
|
app.use(createPinia())
|
||||||
app.use(i18n, { useScope: 'global' })
|
app.use(i18n, { useScope: 'global' })
|
||||||
loadLanguageAsync(localStorage.getItem('lang') || 'en')
|
await loadLanguageAsync(localStorage.getItem('lang') || 'en')
|
||||||
|
|
||||||
app.use(PrimeVue)
|
app.use(PrimeVue)
|
||||||
app.use(ToastService)
|
app.use(ToastService)
|
||||||
|
|
|
@ -21,7 +21,7 @@ const loadedLanguages: string[] = []
|
||||||
|
|
||||||
function setI18nLanguage(lang: Locale) {
|
function setI18nLanguage(lang: Locale) {
|
||||||
i18n.global.locale.value = lang as any
|
i18n.global.locale.value = lang as any
|
||||||
localStorage.setItem('locale', lang)
|
localStorage.setItem('lang', lang)
|
||||||
return lang
|
return lang
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user