You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of this package are you using?
same behavior with next-translate-plugin 2.5.3 and 2.6.0
What operating system, Node.js, and npm version?
Win 11
Node 18.17.1
npm 10.0.0
What happened?
When using a client component in layout.tsx, translation of that component only works on the first page load after (re)starting the application. When reloading the page, the component gets rendered with placeholders only.
When the problem occurs, lang is undefined - which is probably the consequence of AppDirI18nProvider missing in the component tree.
What did you expect to happen?
next-translate claims to work seemlessly for both server and client components. I don't see a reason why one wouldn't expect it to work in this scenario.
Are you willing to submit a pull request to fix this bug?
No, due to lacking experience.
The text was updated successfully, but these errors were encountered:
I never confirmed lang is undefined, but the symptoms are the same for me as well. After reload, the translations are just the keys and the console is full of hydration errors due to the server and client not matching.
I also am attempting to use a client component in a layout which seems perfectly fine to do, but doesn't work for translations in this case.
I don't know why they closed #1151 but I can confirm this bug exists and there's no documentation that says you cannot use client components inside of the layout. I created a repro, maybe this will help boost this issue again: https://codesandbox.io/p/devbox/relaxed-kapitsa-59xwtj
What version of this package are you using?
same behavior with next-translate-plugin 2.5.3 and 2.6.0
What operating system, Node.js, and npm version?
Win 11
Node 18.17.1
npm 10.0.0
What happened?
When using a client component in layout.tsx, translation of that component only works on the first page load after (re)starting the application. When reloading the page, the component gets rendered with placeholders only.
When the problem occurs,
lang
is undefined - which is probably the consequence of AppDirI18nProvider missing in the component tree.This is a duplicate of #1151
What did you expect to happen?
next-translate claims to work seemlessly for both server and client components. I don't see a reason why one wouldn't expect it to work in this scenario.
Are you willing to submit a pull request to fix this bug?
No, due to lacking experience.
The text was updated successfully, but these errors were encountered: