From 5cdecaad490a4455b3d0693770857426c5a00a2c Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 2 Nov 2022 06:27:51 -0700 Subject: Fix Chinese localization --- modern/src/common/components/LocalizationProvider.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modern/src/common') diff --git a/modern/src/common/components/LocalizationProvider.js b/modern/src/common/components/LocalizationProvider.js index e015ccce..85a73e6b 100644 --- a/modern/src/common/components/LocalizationProvider.js +++ b/modern/src/common/components/LocalizationProvider.js @@ -154,7 +154,9 @@ export const LocalizationProvider = ({ children }) => { useEffect(() => { let selected; - if (language.length > 2) { + if (language === 'zh') { + selected = 'zh-cn'; + } else if (language.length > 2) { selected = `${language.slice(0, 2)}-${language.slice(-2).toLowerCase()}`; } else { selected = language; -- cgit v1.2.3