ReferenceError: Cannot access 'loadedTranslations' before initialization should now be fixed

This commit is contained in:
Staninna committed 2025-08-27 23:56:55 +02:00
1 parent 8313fed149
commit 7940410f8f
1 file changed
+6 -6
+6 -6
View File
@@ -211,6 +211,12 @@
}
}
// Simple translation cache
const translationCache = new Map();
// Dynamically loaded translations
let loadedTranslations = {};
const loadLanguagePreference = async () => {
const savedLanguage = localStorage.getItem("wplace_language")
@@ -250,12 +256,6 @@
await loadTranslations("en")
}
// Simple translation cache
const translationCache = new Map();
// Dynamically loaded translations
let loadedTranslations = {};
// Available languages
const AVAILABLE_LANGUAGES = ['en', 'ru', 'pt', 'vi', 'fr', 'id', 'tr', 'zh-CN', 'zh-TW', 'ja', 'ko', 'uk'];