From d7b2844480249e1cfba54d54fd70a3813ca0d648 Mon Sep 17 00:00:00 2001 From: honzapatCZ Date: Fri, 6 Jun 2025 17:27:03 +0200 Subject: [PATCH] support for th_cn and tw in language format -> moving to the correct zh-Hans and Hant --- misc/format.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/misc/format.ts b/misc/format.ts index 852d1fa..752bd0c 100644 --- a/misc/format.ts +++ b/misc/format.ts @@ -62,6 +62,11 @@ export function useLanguageFormat(){ const { i18n } = useTranslation(); return useCallback((language: string) => { + if(language.toLowerCase() == "zh_cn") + language = "zh-Hans"; + else if (language.toLowerCase() == "zh_tw") + language = "zh-Hant"; + return new Intl.DisplayNames(i18n.language, { type: "language", style: "short",