next-i18next: Auto defining fallbackLng in production build breaks v4.5
Describe the bug
Since this change of i18next
v19.8.5 & the default config of next-i18next
v4.5.0 in prod build it is not able to “stay” in the secondary language, SSR renders the secondary language but at client side, it changes to fallbackLng
which is the defaultLanguage
(which is the primary language)
Occurs in next-i18next version
v4.5.0
I’m not able to update to latest since my app uses custom server not just for translations
Steps to reproduce
- clone https://github.com/felixmosh/next-i18next-bug-fallbackLng
- yarn install
- yarn build
- yarn start
- open http://localhost:3000
- change to
de
(check that there isde
subpath) - reload the page
- the page shows in english
Expected behaviour
After reloading the page, it should remain on the Dutch lang
Additional context
It is not possible to turnoff this fallbackLng
behavior since the fix is not available in v4.5.0
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 19 (19 by maintainers)
Yep, as I said, I’ll merge it if you want to do the work!