fix: fully apply language when switching via URL hash
- Reload lesson modules in new language - Re-render sidebar module list - Update progress display - Now #de, #pl etc. properly translate entire UI
This commit is contained in:
@@ -1941,6 +1941,11 @@ function handleRoute(shouldUpdateUrl = true) {
|
||||
// Switch language and redirect to home
|
||||
setLanguage(route.lang);
|
||||
applyTranslations();
|
||||
// Reload modules in new language and re-render sidebar
|
||||
const langModules = loadModules(route.lang);
|
||||
lessonEngine.setModules(langModules);
|
||||
renderModuleList(elements.moduleList, langModules, selectModule, selectLesson);
|
||||
updateProgressDisplay();
|
||||
history.replaceState(null, "", window.location.pathname);
|
||||
showLandingPage();
|
||||
return; // Skip updateNavHighlight/updatePageMeta since we're redirecting
|
||||
|
||||
Reference in New Issue
Block a user