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

AppDirI18nProvider is not loaded after refresh, so lang is null #1151

Closed
EricImpact opened this issue Sep 28, 2023 · 2 comments
Closed

AppDirI18nProvider is not loaded after refresh, so lang is null #1151

EricImpact opened this issue Sep 28, 2023 · 2 comments

Comments

@EricImpact
Copy link
Contributor

What version of this package are you using?

2.6.0 (next-translate & next-translate-plugin)

What operating system, Node.js, and npm version?

MacOS - Ventura 13.4
NPM - 9.8.1
Node - 18.18

What happened?

After running npm run dev, the AppDirI18nProvider provider is loaded when opening the site and lang is set. After refreshing the site, AppDirI18nProvider is no longer loaded and lang is null as a result.

I recorded a video to demonstrate the issue:

https://www.loom.com/share/82fce57da9594cd1a3f358014ec05af6?sid=eca255dc-0505-484f-8a9f-d565ada94d05

What did you expect to happen?

I expect lang to still be set.

Are you willing to submit a pull request to fix this bug?

Sure, if you can help identify where the bug is.

@EricImpact
Copy link
Contributor Author

Closing this as this was not a bug, but my error. Where I went wrong was having client components called from inside my layout.tsx file — translations in those did not work.

@EricImpact EricImpact reopened this Sep 28, 2023
@EricImpact EricImpact closed this as not planned Won't fix, can't repro, duplicate, stale Sep 28, 2023
@fuetgeo
Copy link

fuetgeo commented Oct 11, 2023

Doesn't next-translate claim to work seemlessly for both server and client components?
If there are exceptions to this, where are they stated?
Having client components in layout.tsx doesn't seem to cause any other issues - it's not clear to me why you consider it "your error".

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