fix: sync language dropdown when switching via URL hash

This commit is contained in:
2026-01-15 22:37:42 +01:00
parent 3bfe7a5b01
commit 792127b1c6

View File

@@ -1941,6 +1941,10 @@ function handleRoute(shouldUpdateUrl = true) {
// Switch language and redirect to home
setLanguage(route.lang);
applyTranslations();
// Sync language dropdown
if (elements.langSelect) {
elements.langSelect.value = route.lang;
}
// Reload modules in new language and re-render sidebar
const langModules = loadModules(route.lang);
lessonEngine.setModules(langModules);