monra commited on
Commit
d27e372
1 Parent(s): e267f33

Synced repo using 'sync_with_huggingface' Github Action

Browse files
Files changed (1) hide show
  1. client/js/change-language.js +3 -3
client/js/change-language.js CHANGED
@@ -3,8 +3,8 @@ document.addEventListener('DOMContentLoaded', fetchLanguages);
3
  async function fetchLanguages() {
4
  try {
5
  const [languagesResponse, currentLanguageResponse] = await Promise.all([
6
- fetch('/get-languages'),
7
- fetch('/get-locale')
8
  ]);
9
 
10
  const languages = await languagesResponse.json();
@@ -30,7 +30,7 @@ function setLanguageOnPageLoad(language) {
30
  }
31
 
32
  function changeLanguage(lang) {
33
- fetch("/change-language", {
34
  method: "POST",
35
  headers: {
36
  "Content-Type": "application/json",
 
3
  async function fetchLanguages() {
4
  try {
5
  const [languagesResponse, currentLanguageResponse] = await Promise.all([
6
+ fetch(`${url_prefix}/get-languages`),
7
+ fetch(`${url_prefix}/get-locale`)
8
  ]);
9
 
10
  const languages = await languagesResponse.json();
 
30
  }
31
 
32
  function changeLanguage(lang) {
33
+ fetch(`${url_prefix}/change-language`, {
34
  method: "POST",
35
  headers: {
36
  "Content-Type": "application/json",