From 8188585edd04c7f1b681127a6cb8d2197d0da1f9 Mon Sep 17 00:00:00 2001 From: m1m1sha <18262227804@163.com> Date: Tue, 7 May 2024 10:40:12 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20i18n=20=E8=AF=BB=E5=86=99?= =?UTF-8?q?=20key=20=E4=B8=8D=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- easytier-gui/src/main.ts | 2 +- easytier-gui/src/modules/i18n.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/easytier-gui/src/main.ts b/easytier-gui/src/main.ts index 04c23e2..aea581a 100644 --- a/easytier-gui/src/main.ts +++ b/easytier-gui/src/main.ts @@ -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) diff --git a/easytier-gui/src/modules/i18n.ts b/easytier-gui/src/modules/i18n.ts index 4a28dea..81b58d0 100644 --- a/easytier-gui/src/modules/i18n.ts +++ b/easytier-gui/src/modules/i18n.ts @@ -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 }