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 1440885 + e82f123 commit 382b7b5Copy full SHA for 382b7b5
index.html
@@ -714,8 +714,11 @@
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
+ const currentLang = localStorage.getItem("languagePreference");
+ if (currentLang !== selectedLang) {
719
+ localStorage.setItem("languagePreference", selectedLang);
720
+ location.reload(); // automatically reload
721
+ }
722
});
723
724
}
0 commit comments