Replies: 1 comment 3 replies
-
👍 Thanks for your feedback @jeremie-solios, definitely we need to provide more examples and plugins for i18n cases in the server. cc @benjaminsehl |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey everyone!
As someone relatively new to React, I'm currently playing with hydrogen and trying to translate strings in some server components but hitting a wall.
I started from the provided i18n example (https://github.com/Shopify/hydrogen/tree/v1.x-2022-07/examples/i18n) with
react-i18next
, but the useTranslation hook is only available in client components. I tried to use the Trans component which is working but I get aWarning: Only ServerContext is supported in Flight
in the logs, should it be ignored ?I looked into the useSSR hook (https://react.i18next.com/latest/ssr) but couldn't wrap my head around how to use it in hydrogen.
Some help would be appreciated, thanks!
Beta Was this translation helpful? Give feedback.
All reactions