support for th_cn and tw in language format -> moving to the correct zh-Hans and Hant
This commit is contained in:
parent
0b49c447e0
commit
d7b2844480
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user