Skip to content

Commit

Permalink
fix(i18n): enhance default language fallback (#19107)
Browse files Browse the repository at this point in the history
  • Loading branch information
ultravires authored Sep 12, 2023
1 parent de074fb commit fbee94d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/locale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const localeModels: Dictionary<Model> = {};
export const SYSTEM_LANG = !env.domSupported ? DEFAULT_LOCALE : (function () {
const langStr = (
/* eslint-disable-next-line */
document.documentElement.lang || navigator.language || (navigator as any).browserLanguage
document.documentElement.lang || navigator.language || (navigator as any).browserLanguage || DEFAULT_LOCALE
).toUpperCase();
return langStr.indexOf(LOCALE_ZH) > -1 ? LOCALE_ZH : DEFAULT_LOCALE;
})();
Expand Down

0 comments on commit fbee94d

Please sign in to comment.