Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3b8f9c8b90 |
@@ -57,9 +57,8 @@ export default (store: any) => (next: any) => async (action: PayloadAction<any>)
|
|||||||
} else if (globalThis.navigator?.language) {
|
} else if (globalThis.navigator?.language) {
|
||||||
const browserLanguageBaseTag = globalThis.navigator.language.split('-')[0].toLowerCase();
|
const browserLanguageBaseTag = globalThis.navigator.language.split('-')[0].toLowerCase();
|
||||||
|
|
||||||
const locale = SUPPORTED_BASE_TAGS_LOCALE_MAPPING[
|
const locale = (SUPPORTED_BASE_TAGS_LOCALE_MAPPING[browserLanguageBaseTag] ??
|
||||||
browserLanguageBaseTag
|
SUPPORTED_BASE_TAGS_LOCALE_MAPPING[SupportedLocales.EN]) as SupportedLocales;
|
||||||
] as SupportedLocales;
|
|
||||||
|
|
||||||
if (locale) {
|
if (locale) {
|
||||||
store.dispatch(setSelectedLocale({ locale, isAutoDetect: true }));
|
store.dispatch(setSelectedLocale({ locale, isAutoDetect: true }));
|
||||||
|
|||||||
Reference in New Issue
Block a user