Spaces:
Running
Running
fix the language button
Browse files- components/footer.js +3 -1
- index.html +1 -1
components/footer.js
CHANGED
|
@@ -150,7 +150,9 @@ class CustomFooter extends HTMLElement {
|
|
| 150 |
document.getElementById('footer-language-select').addEventListener('change', function() {
|
| 151 |
const lang = this.value;
|
| 152 |
localStorage.setItem('amplify-language-pref', lang);
|
| 153 |
-
|
|
|
|
|
|
|
| 154 |
});
|
| 155 |
</script>
|
| 156 |
</div>
|
|
|
|
| 150 |
document.getElementById('footer-language-select').addEventListener('change', function() {
|
| 151 |
const lang = this.value;
|
| 152 |
localStorage.setItem('amplify-language-pref', lang);
|
| 153 |
+
i18next.changeLanguage(lang, () => {
|
| 154 |
+
updateContent();
|
| 155 |
+
});
|
| 156 |
});
|
| 157 |
</script>
|
| 158 |
</div>
|
index.html
CHANGED
|
@@ -96,7 +96,7 @@
|
|
| 96 |
<a href="#" class="language-switch block px-4 py-2 text-white hover:bg-yellow-500 hover:text-black" data-lang="fr">Français</a>
|
| 97 |
<a href="#" class="language-switch block px-4 py-2 text-white hover:bg-yellow-500 hover:text-black" data-lang="de">Deutsch</a>
|
| 98 |
</div>
|
| 99 |
-
</div>
|
| 100 |
<a href="login.html" class="bg-yellow-500 hover:bg-yellow-600 text-black font-bold px-4 py-2 rounded-lg transition flex items-center">
|
| 101 |
<i data-feather="user" class="mr-2"></i> Login
|
| 102 |
</a>
|
|
|
|
| 96 |
<a href="#" class="language-switch block px-4 py-2 text-white hover:bg-yellow-500 hover:text-black" data-lang="fr">Français</a>
|
| 97 |
<a href="#" class="language-switch block px-4 py-2 text-white hover:bg-yellow-500 hover:text-black" data-lang="de">Deutsch</a>
|
| 98 |
</div>
|
| 99 |
+
</div>
|
| 100 |
<a href="login.html" class="bg-yellow-500 hover:bg-yellow-600 text-black font-bold px-4 py-2 rounded-lg transition flex items-center">
|
| 101 |
<i data-feather="user" class="mr-2"></i> Login
|
| 102 |
</a>
|