We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b5cec7 commit 83088cbCopy full SHA for 83088cb
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