Closed kaspernowak closed 5 months ago
I ran into this issue recently, paired with the translation keys flashing up on the screen during development, when the SSR was turned off.
Turns out the fix is fairly easy. You just mount the Vue app after the translation files got loaded, like in https://github.com/xiCO2k/laravel-vue-i18n/issues/117#issuecomment-1627295319.
Thanks @andreiio
I am struggling with using inertia SSR with localization, where I get a
Hydration text content mismatch on
warning.As an example I set up a quick test project, with Home.vue looking like this:
Then for brevity, I added this to my default inertia app.js :
And this to my ssr.js:
When I load my Home.vue page, I get this warning and error in the browser console:
So it seems like the client isn't hydrating the frontend with the translation on page load, which causes this mismatch. Is this something I should just ignore, or is there a way that I can fix this?