-
Hi @sergiodxa, I tried your library, thinking about including i18n in my project before it is too late. But I'm already facing a weird issue: Warning: Text content did not match. Server: "Bonjour" Client: "Hello" I understand there is a clash during the hydration, with a missmatch between the server and the client. But I don't get why.. It seems I followed everything from scratch. A sandbox repo is available here: https://github.com/binajmen/remix-i18n-sandbox/tree/main/app/routes/ FYI, I'm in Belgium, so perhaps there is a clash between A secondary question would be: how do you handle locale selection when using I noticed this code snippet in another discussion, but it is unclear how I could make is work with a path instead. Thank you for your help 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
This happens because you didn't loaded the same translations on the server and the client, ensure since you're using a You either use i18n.getLocale or use the params on the URL. |
Beta Was this translation helpful? Give feedback.
This happens because you didn't loaded the same translations on the server and the client, ensure since you're using a
$lang
route to detect the user language, you should not detect it usingi18n.getLocale
because that will not respect the URL, it will read it from your search params, session, cookie or headers.You either use i18n.getLocale or use the params on the URL.