Skip to content

Commit

Permalink
Change fallback to en-US
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewy-gh committed Sep 18, 2024
1 parent 1b8049d commit 94f9329
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/front/src/util/surveyUtils.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Current supported survey languages
const supportedLanguages = ["en"];
const supportedLanguages = ["en-US"];

export const validateLanguage = () => {
const langPref = localStorage.getItem("langPref");
if (typeof langPref !== "string") {
return "en";
return "en-US";
}
const generalLang = langPref.split("-")[0];
return supportedLanguages.includes(generalLang) ? generalLang : "en";
return supportedLanguages.includes(generalLang) ? generalLang : "en-US";
};

export const buildSurveyCacheKey = (surveyId, homeId) =>
Expand Down

0 comments on commit 94f9329

Please sign in to comment.