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