Added explicit handling of zh locale, prevent it from falling back to english

This commit is contained in:
Dev 2024-10-23 13:31:47 +01:00
parent d744a38306
commit a27e4fd334

View File

@ -96,6 +96,11 @@ export class LocaleService {
// Chek if base language (e.g. CN / EN / DE) exists
const languageCode = platformLocale.language.toLocaleLowerCase();
if (this.localeConfig.serverSupportedLocales.includes(languageCode)) {
if (baseNameCode === "zh") {
// Handle edge case of zh
return "zh-cn";
}
return languageCode;
}