i18n: handling 404

This commit is contained in:
Jean-Baptiste Pasquier 2020-10-22 16:38:16 +00:00
parent 190d760024
commit 91012ededf
1 changed files with 7 additions and 0 deletions

View File

@ -119,6 +119,13 @@ class JsI18n {
console.error("Language not found");
}
});
} else {
if (locale != "fr") {
console.warn(`Locale not found: ${locale}, fallback to french`);
this.setLocale("fr");
} else {
console.error("Language not found");
}
}
});
this.locale = locale;