Skip to content

Translations are not SSR? #66

Answered by sergiodxa
thomasverleye asked this question in Q&A
Discussion options

You must be logged in to vote

@thomasverleye you need to load the translations on both the server and client.

On entry.server, you need to load them before rendering so the HTML comes with the correct texts.

On entry.client, you need to load them before hydrating the app because without that, the hydration will replace the translated strings with the keys and then once it loaded the translation files it will switch them back again.

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@florianchevallier
Comment options

@akash191095
Comment options

@HeroProtagonist
Comment options

@florianchevallier
Comment options

@HeroProtagonist
Comment options

Answer selected by thomasverleye
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants