Compare commits
2 Commits
11ce28085b
...
20ed4bb88f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20ed4bb88f | ||
|
|
d7b2844480 |
|
|
@ -62,6 +62,11 @@ export function useLanguageFormat(){
|
||||||
const { i18n } = useTranslation();
|
const { i18n } = useTranslation();
|
||||||
|
|
||||||
return useCallback((language: string) => {
|
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, {
|
return new Intl.DisplayNames(i18n.language, {
|
||||||
type: "language",
|
type: "language",
|
||||||
style: "short",
|
style: "short",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user