lang: navbar translation
This commit is contained in:
@ -135,6 +135,12 @@ document.addEventListener("DOMContentLoaded", async () => {
|
||||
navigateTo(e.target.href.slice(location.origin.length));
|
||||
}
|
||||
});
|
||||
|
||||
//Languages
|
||||
Array.from(document.getElementById('languageSelector').children).forEach(el => {
|
||||
el.onclick = _ => client.lang.changeLanguage(el.value);
|
||||
});
|
||||
|
||||
await client.isAuthentificate();
|
||||
router(location.pathname);
|
||||
document.querySelector('a[href=\'' + location.pathname + '\']')?.classList.add('active');
|
||||
|
Reference in New Issue
Block a user