Error: Invalid default language 'en'. Check your 'defaultLang' in 'i18n/index.js'?
Chhunneng opened this issue · 3 comments
Chhunneng commented
Hello, I just implement this package in my project and I got an unexpected error.
Error: Invalid default language 'en'. Check your 'defaultLang' in 'i18n/index.js'?
From
const { t } = useTranslation();
Here is my i18n/index.js
var en = require("./translations.en.json");
var km = require("./translations.km.json");
var zh = require("./translations.zh.json");
const i18n = {
translations: {
en: en.i18n,
km: km.i18n,
"zh-Hans": zh.i18n,
},
defaultLang: "en",
useBrowserDefault: true,
};
module.exports = i18n;
Chhunneng commented
I already solved :)
kevinunger commented
@Chhunneng How?
Chhunneng commented
Sorry, I forgot how to solve this one. it's long time ago
@Chhunneng How?