diff --git a/frontend/front/src/util/surveyUtils.js b/frontend/front/src/util/surveyUtils.js index 14203506..952e5a77 100644 --- a/frontend/front/src/util/surveyUtils.js +++ b/frontend/front/src/util/surveyUtils.js @@ -6,8 +6,7 @@ export const validateLanguage = () => { if (typeof langPref !== "string") { return "en-US"; } - const generalLang = langPref.split("-")[0]; - return supportedLanguages.includes(generalLang) ? generalLang : "en-US"; + return supportedLanguages.includes(langPref) ? langPref : "en-US"; }; export const buildSurveyCacheKey = (surveyId, homeId) =>