0

I'm use NextJS and i18next

Here is my config file

const NextI18Next = require('next-i18next').default;

module.exports = new NextI18Next({
  localePath: 'public/static/locales',
  browserLanguageDetection: false,
  serverLanguageDetection: false,
  defaultLanguage: 'en',
  otherLanguages: ['en','ru'],
  load: 'all',
});

In these .json files save my languages

And it works(Languages are change) but it returns to me this error

Invalid configuration: Current language is not included in all languages array

I tried so many things but nothing havent worked

felixmosh
  • 32,615
  • 9
  • 69
  • 88

1 Answers1

0

Your defaultLanguage is 'en', which means it shouldn't be in your otherLanguages array. Remove 'en' from otherLanguages, and it should work.

GainorB
  • 188
  • 1
  • 2
  • 6