0

I'm using react i18next like described in the step by step guide https://react.i18next.com/latest/using-with-hooks

Everything works fine I think, but if I browse my site in Google Chrome I get the Warning

i18next::backendConnector: loading namespace nav for language de-DE failed failed parsing /locales/de-DE/nav.json to json

So there is no folder de-DE under locales, but when I create this folder the warning is gone.

In Firefox there is no warning, so in my opinion it's the way the browser submits the preferred locale of the user. (Chrome sends de-DE and FF sends de)

So I only want to have on folder for translations (locales/de) Is it possible to avoid the Warnings?

Thanks in advance

I have searched the internet but does not found any solution

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Dirk
  • 11
  • 3

1 Answers1

0

Looks like your configuration allows all languages, Try to set the supportedLngs array to be ['de'], and enable the nonExplicitSupportedLngs option,

if true, will consider variants as supported when the main language is. E.g. en-US will be valid if en is in supportedLngs.

For more options, checkout docs

felixmosh
  • 32,615
  • 9
  • 69
  • 88