Next.js Discord

Discord Forum

i18next in client-components

Unanswered
Asian black bear posted this in #help-forum
Open in Discord
Asian black bearOP
I have just added i18next to my project and it works great so far with server components. I have a multi step form, which includes multiple form components which are all client components. Is there a best practice for injecting translations into client components? The documentation states that the most efficient way is to inject it as props, but I can't imagine this to be the solution, because there are so many form fields and so many translations to consider... How would you tackle this?

5 Replies

Pyramid ant
One question: in your server component are you able to use <Trans> element? (I use it a lot in i18n projects)
Is super handy for complex html styling managin in one single translation