Simon Depelchin
Simon Depelchin
@timofei-iatsenko thanks for taking a look. What would you use instead of the global i18n instance? I'm not in production yet, but have not seen any particular issue so far...
Thanks for the pointers, I'll try to take a look at this before merging. It should be trivial to simply add the i18n instance to the router context in the...
> I pushed a commit which is getting rid of all global i18n instances usages. .. > Please check the code i pushed, because i didn't test all possible cases....
@timofei-iatsenko I managed to make a simple router wrapper that handle the catalog hydration. I'm not sure how I did as I never played with that, but it seems to...
> So hydrate/dehydrate is the magic behind the `routerWithQueryClient`? need to battle test this approach in a real world application to understand limitations / flaws. Yes, here's the `routerWithQueryClient` [file](https://github.com/TanStack/router/blob/5106aa36d1d0c9354d5f9e96d639169d5dbdf622/packages/react-router-with-query/src/index.tsx#L34)...
The loader will run in the client when you click the `` link, so you'll still end up with loading the catalog in two different ways. Perhaps the URL-based locale...
I've added an example page that uses a `/$lang/` route segment. I chose not to put everything under that segment for simplicity. > Not really, it will always be loaded...
I think that if you setup a new instance in the Page component, it'll be different from the context.i18n which is the one you'd use in the loaders/head functions for...
>> I think that if you setup a new instance in the Page component, it'll be different from the context.i18n which is the one you'd use in the loaders/head functions...
@jsefiani If you have feedback about this PR it's more than welcome :) I don't think there is a better way to translate metatags in the head function than what...