diff --git a/core/modules/utils/utils.js b/core/modules/utils/utils.js index 96ca7b92b..65d23ff6a 100644 --- a/core/modules/utils/utils.js +++ b/core/modules/utils/utils.js @@ -165,9 +165,10 @@ Check whether a language code is supported by Intl */ exports.checkLanguageCode = lang => { try { - "a".localeCompare("a", lang); + Intl.Collator(lang); return true; } catch(e) { + console.warn(`Warning: ${lang} is not a valid language code.`); return false; } }