Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
) {
appLocale = localeInfo[localStorage.getItem('umi_locale')];
} else if (
typeof navigator !== 'undefined'
&& localeInfo[navigator.language]
&& baseNavigator
) {
appLocale = localeInfo[navigator.language];
} else if(localeInfo[runtimeLocaleDefault]){
appLocale = localeInfo[runtimeLocaleDefault];
} else {
appLocale = localeInfo['zh-CN'] || appLocale;
}
window.g_lang = appLocale.locale;
window.g_langSeparator = baseSeparator || '-';
appLocale.data && addLocaleData(appLocale.data);
return appLocale;
}
reloadAppLocale = () => {