From e1158bf8e042e87a97baa7178248db6ea081d392 Mon Sep 17 00:00:00 2001 From: Xylight Date: Tue, 9 Jul 2024 16:41:38 -0700 Subject: [PATCH] i18n: add support for chinese --- src/lib/i18n/en.json | 3 +++ src/lib/translations.ts | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/lib/i18n/en.json b/src/lib/i18n/en.json index c4a81746..8fdfc975 100644 --- a/src/lib/i18n/en.json +++ b/src/lib/i18n/en.json @@ -581,6 +581,9 @@ "de": "German", "fi": "Finnish", "pt": "Portuguese", + "zh": "Chinese", + "zh-Hans": "Chinese (Simplified)", + "zh-Hant": "Chinese (Traditional)", "auto": "Auto", "credits": "Credits", "useRtl": { diff --git a/src/lib/translations.ts b/src/lib/translations.ts index 8748f344..4a5709fe 100644 --- a/src/lib/translations.ts +++ b/src/lib/translations.ts @@ -37,6 +37,16 @@ const config: Config = { key: '', loader: async () => (await import('./i18n/pt.json')).default, }, + { + locale: 'zh-Hans', + key: '', + loader: async () => (await import('./i18n/zh-Hans.json')).default, + }, + { + locale: 'zh-Hant', + key: '', + loader: async () => (await import('./i18n/zh-Hant.json')).default, + }, ], fallbackLocale: 'en', }