diff --git a/html/assets/js/topbar-logo.js b/html/assets/js/topbar-logo.js index 6b924a2..c377130 100644 --- a/html/assets/js/topbar-logo.js +++ b/html/assets/js/topbar-logo.js @@ -70,5 +70,10 @@ document.addEventListener('DOMContentLoaded', () => { document.querySelectorAll('.sidebar-hotspot-badge').forEach(badge => { badge.style.display = (config.WIFI_status === 'hotspot') ? '' : 'none'; }); + + // 5. Re-apply i18n translations for dynamically loaded elements (sidebar, topbar) + if (window.i18n && typeof window.i18n.applyTranslations === 'function') { + window.i18n.applyTranslations(); + } } }); diff --git a/html/wifi.html b/html/wifi.html index e5c376a..fe471f5 100755 --- a/html/wifi.html +++ b/html/wifi.html @@ -227,6 +227,10 @@ .then(data => { document.getElementById('sidebar').innerHTML = data; document.getElementById('sidebar_mobile').innerHTML = data; + // Re-apply translations to dynamically loaded sidebar + if (typeof i18n !== 'undefined' && i18n.translations) { + i18n.applyTranslations(); + } }) .catch(e => console.error('Error loading sidebar:', e));