From 9253df7f60c0ecc28a6fa543cc08ea39f337e8b2 Mon Sep 17 00:00:00 2001 From: li Nico <37568394+NicolaCage@users.noreply.github.com> Date: Fri, 8 Jul 2022 14:50:26 +0800 Subject: [PATCH] fix: i18n error (#93) --- src/App.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 6cab54cd..c04b6344 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -42,7 +42,7 @@ class App extends React.Component { if (match) { cookies.set('locale', match[1] === 'EN_US' ? 'EN_US' : 'ZH_CN'); } else { - cookies.set('locale', lang === 'en' ? 'EN_US' : 'ZH_CN'); + cookies.set('locale', lang === 'EN_US' ? 'EN_US' : 'ZH_CN'); } } @@ -61,7 +61,7 @@ class App extends React.Component { loadIntlLocale = () => { intl .init({ - currentLocale: this.currentLocale || 'zh_CN', + currentLocale: this.currentLocale || 'ZH_CN', locales: INTL_LOCALES, }) .then(() => {