From 927d1a78b58cc674a517f3212de687f50c7e21ca Mon Sep 17 00:00:00 2001 From: josc146 Date: Sun, 21 May 2023 17:34:24 +0800 Subject: [PATCH] fix language setting --- frontend/src/stores/commonStore.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/src/stores/commonStore.ts b/frontend/src/stores/commonStore.ts index b0eff2d..a58b8fd 100644 --- a/frontend/src/stores/commonStore.ts +++ b/frontend/src/stores/commonStore.ts @@ -9,6 +9,7 @@ import {DownloadStatus} from '../pages/Downloads'; import {SettingsType} from '../pages/Settings'; import {IntroductionContent} from '../pages/Home'; import {AboutContent} from '../pages/About'; +import i18n from 'i18next'; export enum ModelStatus { Offline, @@ -120,6 +121,9 @@ class CommonStore { else WindowSetLightTheme(); + if (this.settings.language) + i18n.changeLanguage(this.settings.language); + if (saveConfig) saveConfigs(); };