i18next: i18next.t() doesn't work

After update i18next to 10.3.0 (from 10.2.2), i18next.t() doesn’t work in my React app.

It’s how I init i18next:

i18next.init({
    lng: locale,
    resources:
        LocaleAdapter.transformLocalesToi18nextResourceObjectNotation(_merge(
          appLocales,
          locales,
        )),
});

If I revert to 10.2.2, it’s working.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

Hi @jamuhl! I understanded why I catched this error… It’s because I used different instance of i18next in my app o_O In external package I usage 10.2.2 version, but in my app I use 10.3.0 version of i18next. It’s my fault, sorry for this issue…

hm…wasn’t able to reproduce this…both loading translations via xhr or passing in via options.resources worked. Must be something more specific to your code - but i don’t see what it could be from your configuration.

Could you console.log(i18next.services.resourceStore.data);