Translations are not SSR? #66
-
Is it true the translations need to load client-side first before rendering? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
@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. |
Beta Was this translation helpful? Give feedback.
@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.