mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-05 21:46:49 +01:00
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 localeFile = String(overrideLanguage || navigator.language || navigator.userLanguage || 'en').toLowerCase();
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user