From 271bdb7f502628d4a6f08ad88787ea76acf844cf Mon Sep 17 00:00:00 2001 From: naiba Date: Sun, 15 Dec 2024 15:27:23 +0800 Subject: [PATCH] chore: change key --- src/lib/i18n.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/i18n.ts b/src/lib/i18n.ts index 616cdcf..4ccaddf 100644 --- a/src/lib/i18n.ts +++ b/src/lib/i18n.ts @@ -7,7 +7,7 @@ import zhCNTranslation from "../locales/zh-CN/translation.json" import zhTWTranslation from "../locales/zh-TW/translation.json" const resources = { - en: { + "en-US": { translation: enTranslation, }, it: { @@ -28,7 +28,7 @@ const getStoredLanguage = () => { i18n.use(initReactI18next).init({ resources, lng: getStoredLanguage(), // 使用localStorage中存储的语言或默认值 - fallbackLng: "en", // 当前语言的翻译没有找到时,使用的备选语言 + fallbackLng: "en-US", // 当前语言的翻译没有找到时,使用的备选语言 interpolation: { escapeValue: false, // react已经安全地转义 },