We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cbabe92 commit a364607Copy full SHA for a364607
utils/getLanguage.ts
@@ -66,6 +66,12 @@ export default function getLanguage() {
66
const languageFilePath = path.resolve(localesRoot, `${locale}.json`)
67
const doesLanguageExist = fs.existsSync(languageFilePath)
68
69
+ if (!doesLanguageExist) {
70
+ console.warn(
71
+ `\x1B[33mThe locale langage "${locale}" is not supported, fallback to "en-US".\n\x1B[39m`
72
+ )
73
+ }
74
+
75
const lang: Language = doesLanguageExist
76
? require(languageFilePath)
77
: require(path.resolve(localesRoot, 'en-US.json'))
0 commit comments