Fazbeeer commited on
Commit
486d8db
·
verified ·
1 Parent(s): a0ed465

can you actually translate the website when I change the language to espanol

Browse files
Files changed (1) hide show
  1. components/footer.js +8 -1
components/footer.js CHANGED
@@ -146,7 +146,14 @@ class CustomFooter extends HTMLElement {
146
  <option value="de">Deutsch</option>
147
  </select>
148
  </div>
149
- </div>
 
 
 
 
 
 
 
150
 
151
  <div>
152
  <h3 class="text-lg font-bold text-white mb-4">Products</h3>
 
146
  <option value="de">Deutsch</option>
147
  </select>
148
  </div>
149
+ <script>
150
+ document.getElementById('footer-language-select').addEventListener('change', function() {
151
+ const lang = this.value;
152
+ localStorage.setItem('amplify-language-pref', lang);
153
+ window.dispatchEvent(new CustomEvent('language-changed', { detail: lang }));
154
+ });
155
+ </script>
156
+ </div>
157
 
158
  <div>
159
  <h3 class="text-lg font-bold text-white mb-4">Products</h3>