Added explicit handling of zh
locale, prevent it from falling back to english
This commit is contained in:
parent
d744a38306
commit
a27e4fd334
@ -96,6 +96,11 @@ export class LocaleService {
|
|||||||
// Chek if base language (e.g. CN / EN / DE) exists
|
// Chek if base language (e.g. CN / EN / DE) exists
|
||||||
const languageCode = platformLocale.language.toLocaleLowerCase();
|
const languageCode = platformLocale.language.toLocaleLowerCase();
|
||||||
if (this.localeConfig.serverSupportedLocales.includes(languageCode)) {
|
if (this.localeConfig.serverSupportedLocales.includes(languageCode)) {
|
||||||
|
if (baseNameCode === "zh") {
|
||||||
|
// Handle edge case of zh
|
||||||
|
return "zh-cn";
|
||||||
|
}
|
||||||
|
|
||||||
return languageCode;
|
return languageCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user