Can i use both Server Side & Client Side translations #809
Unanswered
rawand-faraidun
asked this question in
Q&A
Replies: 1 comment 1 reply
-
@amannn hey friend, sorry to bother but this question is so important for me |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sorry, I could not get a better title but I will try to describe it better here.
in my application I have a situation in which I have to use both client translations and server ones too, I have many namespaces like
common
,home
, and etc..., and I am using them regularly like the documentation. I am so happy that all of my translations won't end up on the client side and I got great SSR and Performance. Still, there is one namespace "statusCode" I have to get into the client side, what I want to know is whether it is possible to have the whole application using the regular way and only provide that namespace messages to the client side for easier use?maybe by providing that one message into
NextIntlClientProvider
and if I usedconst t = useTranslations('statusCode')
it uses the client one so it is available for client components, but any other translations are still done in the serverI hope I could be able to clarify what I need, I can make a provider for that and only add
statusCode
messages and use it there but if it was available from the library itself it would be better.thanks
Beta Was this translation helpful? Give feedback.
All reactions