We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ce3449b + 2fa3ce1 commit cd58f16Copy full SHA for cd58f16
index.html
@@ -706,6 +706,19 @@
706
index = (index + 1) % texts.length;
707
}, 1500);
708
}, 3000);
709
+
710
+ const languageDropdown = document.getElementById("languagedropdown");
711
+ if (languageDropdown) {
712
+ const langLinks = languageDropdown.querySelectorAll("a");
713
+ langLinks.forEach(link => {
714
+ link.addEventListener("click", function (e) {
715
+ e.preventDefault(); // prevent default <a> behavior
716
+ const selectedLang = this.id; // ID corresponds to language code
717
+ localStorage.setItem("languagePreference", selectedLang);
718
+ location.reload(); // automatically reload
719
+ });
720
721
+ }
722
});
723
724
</script>
0 commit comments