Replies: 1 comment
-
@amannn I have the same doubts. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
According to the documentation the benefits of server-side internationalization are:
However, the library allows using translations in server and client simultaneously.
Do these pros apply only when I have no
NextIntlClientProvider
in my component tree?In a situation where I have to translate some of the messages on the client, do I still get any benefit from server-side internationalization, or are all the pros negated at this point?
An example of a situation like this would be a message that needs client-side data for dynamic values.
messages/en.json
app/[locale]/login/LoginForm.tsx
t('welcome', { name: response.profile.user_name })
consumes data received by a client-side handler. Any reason to movet('loggedIn')
to a server component and pass it down as a prop?Beta Was this translation helpful? Give feedback.
All reactions