Fix loading locale data
This commit is contained in:
parent
297519c401
commit
cd47f3b238
|
@ -5,7 +5,9 @@ const storageKey = 'language';
|
||||||
const overrideLanguage = localStorage.getItem(storageKey);
|
const overrideLanguage = localStorage.getItem(storageKey);
|
||||||
const localeFile = String(overrideLanguage || navigator.language || navigator.userLanguage || 'en').toLowerCase();
|
const localeFile = String(overrideLanguage || navigator.language || navigator.userLanguage || 'en').toLowerCase();
|
||||||
const langs = await fetch('/locales/lang.json').then(response => response.json());
|
const langs = await fetch('/locales/lang.json').then(response => response.json());
|
||||||
const localeData = await getLocaleData(localeFile);
|
// Don't change to let/const! It will break module loading.
|
||||||
|
// eslint-disable-next-line prefer-const
|
||||||
|
var localeData = await getLocaleData(localeFile);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches the locale data for the given language.
|
* Fetches the locale data for the given language.
|
||||||
|
|
Loading…
Reference in New Issue