React-i18next: use react-i18next in nextjs, occasionally error

Created on 11 Jun 2019  路  6Comments  路  Source: i18next/react-i18next

Firstly, I used nextjs in my project, but I did't use next-i18next. Because next-i18next not support Chinese, proof as https://github.com/isaachinman/next-i18next/issues/317

Secondly, I used react-i18next in my project. I created a demo project only including react-i18next, so it can work well! Then I used react-i18next in my real project in the same way, it not work. My real project includes something not only react-i18next.

index.js:1 Warning: Text content did not match. Server: "娴嬭瘯" Client: "Loading..."

a demo project url: https://github.com/huanglijiao/react-i18next-demo
my real project url: https://github.com/huanglijiao/joox-web-nextjs2

the access url in the brower: http://localhost:3000/?country=th&lang=th or
http://localhost:3000/?country=my&lang=en

I check it some days, please help to check.

Most helpful comment

@huanglijiao can you please clarify how you fixed your issue because I have the same issue right now?

All 6 comments

typical problem using next.js - as it says there is a mismatch between server and client. Hope you understand I got no time to debug - give free support for your code...this is not an issue with react-i18next but an implementation issue in your code - which you would not have with next-i18next

my personal suggestion: try setting next-i18next up and get those locals subpath support for languages with region specification working -> PR that to next-i18next

I stick to use react-i18next, it鈥榮 flexible. And I have solved the problem last night. Thank.

@huanglijiao can you please clarify how you fixed your issue because I have the same issue right now?

@huanglijiao We faced problems with next-i18next and would like to configure react-i18next v10 on our own. Could you please provide an example with your configuration? That would be a really great help.

@BondoS @keethu24 did you solve the issue somehow?

Im having this problem aswell, does anyone have a solution for this?

Was this page helpful?
0 / 5 - 0 ratings