-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
Can I use the next-intl for client components and the server next-intl in one nextjs.13.5 project. #546
Comments
You can easily use for both with the same hook, you just need to setup both side, the i18n getRequestConfig + middleware for server side and the provider + the fetch messages for client one (+navigation if you're using next-intl 3) |
I am using "next-intl": "^2.20.2", |
can you send a code snippet? |
I can't right now but you just have to follow both installations on the doc website, if you would need help, you can add me on discord! |
I am trying to write a helper function
this function will be exported to layout.tsx, then i will take the messages from localStorage and pass it into the NextIntlClientProvider |
Why ? It's useless.
|
you are right |
I guess this is resolved, then? This is the guide in the docs that covers Server and Client Components. |
i think is missing the middleware, because the middleware on server and client are exact opposites each other. client
server
i just can't get them both to work, it's not clear if it is loading the messages two times, as we have them in the layout and in the plugin(nextjs config) |
Is your feature request related to a problem? Please describe.
to be able to use the next-intl both in my client and server component in one nextjs.13.5 projetc.
i want to achieve this because my components are mixed , some are server components while some are server components
Describe the solution you'd like
N/A
Describe alternatives you've considered
N/A
The text was updated successfully, but these errors were encountered: