aboutsummaryrefslogtreecommitdiff
path: root/modern/src/common
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-11-02 06:27:51 -0700
committerAnton Tananaev <anton@traccar.org>2022-11-02 06:27:51 -0700
commit5cdecaad490a4455b3d0693770857426c5a00a2c (patch)
tree1f3af2149c418c1aacce200eae0df553f39280a8 /modern/src/common
parent9562f4bb0f2ac3783b0d15d97c6e122a0e407bab (diff)
downloadtrackermap-web-5cdecaad490a4455b3d0693770857426c5a00a2c.tar.gz
trackermap-web-5cdecaad490a4455b3d0693770857426c5a00a2c.tar.bz2
trackermap-web-5cdecaad490a4455b3d0693770857426c5a00a2c.zip
Fix Chinese localization
Diffstat (limited to 'modern/src/common')
-rw-r--r--modern/src/common/components/LocalizationProvider.js4
1 files changed, 3 insertions, 1 deletions
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;