QuiiBz / next-international

Type-safe internationalization (i18n) for Next.js
https://next-international.vercel.app
MIT License
1.26k stars 59 forks source link

Using next-international on client and server components in nextjs.13.5 version #211

Open temtechie opened 11 months ago

temtechie commented 11 months ago

Is your feature request related to a problem? Please describe. How to use the next-international package on client and server component in one project.

In this case i have a project running in nextjs 13.5 I am using the 'use client' flag in my root layout,tsx making it a client component. and I also i have many other components that are clients and server components, how do I handle the configuration to make it work. note: in am using /src

Describe the solution you'd like A clear configuration setup to enable me use the next-international on the case described above.

Additional context does it mean this next-international just works fine with the same setup on client and server component?

QuiiBz commented 11 months ago

We have an example using many features here: https://github.com/QuiiBz/next-international/tree/main/examples/next-app

And the CodeSandbox example here: https://codesandbox.io/p/sandbox/jovial-paper-skkprk?file=%2Fapp%2F%5Blocale%5D%2Fpage.tsx%3A1%2C1

Feel free to send a minimal reproduction of what you're struggling with, but next-international works fine across both Server and Client Components.