From 5b121d78551d471125737daf31d4e0505e69e409 Mon Sep 17 00:00:00 2001 From: simeng-li Date: Thu, 7 Jul 2022 11:08:07 +0800 Subject: [PATCH] fix(ui): set ui specific i18n storage key (#1441) * chore(ui): set ui i18n storage key set ui i18n storage key * fix(ui): update name update name * chore(console): add ac i18n storage key add ac i18n storage key * fix(ui,console): update key name update key name * fix(ui,console): fix typo fix typo --- packages/console/src/i18n/init.ts | 4 ++++ packages/ui/src/i18n/init.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/packages/console/src/i18n/init.ts b/packages/console/src/i18n/init.ts index 79fdadd8a..c62d03d68 100644 --- a/packages/console/src/i18n/init.ts +++ b/packages/console/src/i18n/init.ts @@ -14,6 +14,10 @@ const initI18n = async (language?: Language) => escapeValue: false, }, lng: language, + detection: { + lookupLocalStorage: 'i18nextLogtoAcLng', + lookupSessionStorage: 'i18nextLogtoAcLng', + }, }); export default initI18n; diff --git a/packages/ui/src/i18n/init.ts b/packages/ui/src/i18n/init.ts index 8e36cbe4a..16722d961 100644 --- a/packages/ui/src/i18n/init.ts +++ b/packages/ui/src/i18n/init.ts @@ -11,6 +11,10 @@ const initI18n = async (languageSettings?: LanguageInfo) => { interpolation: { escapeValue: false, }, + detection: { + lookupLocalStorage: 'i18nextLogtoUiLng', + lookupSessionStorage: 'i18nextLogtoUiLng', + }, }; const options: InitOptions =