Skip to content

Commit f2e1ae1

Browse files
committed
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
1 parent 8cbf0b0 commit f2e1ae1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/app.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1941,6 +1941,11 @@ function handleRoute(shouldUpdateUrl = true) {
19411941
// Switch language and redirect to home
19421942
setLanguage(route.lang);
19431943
applyTranslations();
1944+
// Reload modules in new language and re-render sidebar
1945+
const langModules = loadModules(route.lang);
1946+
lessonEngine.setModules(langModules);
1947+
renderModuleList(elements.moduleList, langModules, selectModule, selectLesson);
1948+
updateProgressDisplay();
19441949
history.replaceState(null, "", window.location.pathname);
19451950
showLandingPage();
19461951
return; // Skip updateNavHighlight/updatePageMeta since we're redirecting

0 commit comments

Comments
 (0)