0

I wonder why does next-i18next need next-i18next.config.js.

My guess is that i18n-related data declared in next.config.js can be pulled out, but I wonder why it needs to exist as a separate file. In my case, Front is configured as a monorepo, so in that case i need to create next-i18next.config.js in every monorepo.

Having a separate file creates a lot of additional work, which is inconvenient. Is there a solution?

I pushed the contents of i18next.config.js into next.config.js.

1 Answers1

0

i18n-related data in the nextjs config only concerns a small subset of keys in next-i18next.config.js related to router and locales, which is not enough to run a proper i18next instance for handling translations.
If creating an extra config is too much work for you, then you should rethink if you need multilang support in the first place, because it's a permanent overhead in the form of extra files and general code complexity for every component/page down the line anyway, the extra config is a drop in the ocean compared to that.

Biller Builder
  • 303
  • 3
  • 10