I am using i18next with react app, however:
Logs like this on every re-render are really slowing down my application:
i18next::languageUtils: rejecting non-whitelisted language code: en
How do I disable them?
I have debug set to false.
I am using i18next with react app, however:
Logs like this on every re-render are really slowing down my application:
i18next::languageUtils: rejecting non-whitelisted language code: en
How do I disable them?
I have debug set to false.
Share Improve this question edited Feb 13, 2017 at 19:26 Ľubomír asked Feb 13, 2017 at 18:49 ĽubomírĽubomír 1,1612 gold badges12 silver badges22 bronze badges2 Answers
Reset to default 17Just change debug flag which goes in init function to false
i18n.init({
resources,
debug: false, // It should be false
lng: 'en',
fallbackLng: 'en',
});
Maybe you can fix these errors one by one, for example, i18next has an option for non-whitelisted language codes: https://github.com/i18next/i18next/blob/6aa81cd22f5e7fe0989d6920471e8e32d173af8c/src/defaults.js#L12
There are other options too, can be helpful if you get other types of errors.