Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I've Identified a Scenario Preventing ni18n from Functioning Properly #179

Open
yangfei4913438 opened this issue Jan 3, 2024 · 1 comment

Comments

@yangfei4913438
Copy link

In my new project, I've opted to use Next.js 14 as the development framework, and for handling multilingual support, I chose ni18n because it doesn't require the cumbersome configuration that I truly dislike, which is associated with the multilingual libraries officially recommended by Next.js.

Getting back to the main issue, after installing ni18n, I encountered a persistent warning in the web terminal about inconsistencies between server-side and client-side rendering (this might not be the exact wording, but it conveys the gist). My initial thought was that there might be a bug in the new version of Next.js, leading me into a frustrating cycle of downgrading and encountering errors, then downgrading further and facing more issues.

I proceeded to search on Google for a solution but didn't find any useful information. However, I noticed that many similar issues pointed towards the same library - react-i18next, which I mentioned earlier. I decided to try downgrading this library, and after rolling back to version 11, the web terminal stopped displaying any rendering errors, and the pages were clear. It's hard to express my relief.

I wanted to share my experience with everyone, hoping that if you face similar issues, you can resolve them quickly.

@carloschneider
Copy link

In my new project, I've opted to use Next.js 14 as the development framework, and for handling multilingual support, I chose ni18n because it doesn't require the cumbersome configuration that I truly dislike, which is associated with the multilingual libraries officially recommended by Next.js.

Getting back to the main issue, after installing ni18n, I encountered a persistent warning in the web terminal about inconsistencies between server-side and client-side rendering (this might not be the exact wording, but it conveys the gist). My initial thought was that there might be a bug in the new version of Next.js, leading me into a frustrating cycle of downgrading and encountering errors, then downgrading further and facing more issues.

I proceeded to search on Google for a solution but didn't find any useful information. However, I noticed that many similar issues pointed towards the same library - react-i18next, which I mentioned earlier. I decided to try downgrading this library, and after rolling back to version 11, the web terminal stopped displaying any rendering errors, and the pages were clear. It's hard to express my relief.

I wanted to share my experience with everyone, hoping that if you face similar issues, you can resolve them quickly.

Works for me, thanks!

Just in case someone else search for it:

Error: Text content does not match server-rendered HTML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants