i18n support for route urls #2713
jvdwijngaard
started this conversation in
Ideas
Replies: 2 comments 1 reply
-
how do other routers handle this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Couple of years ago I worked on a Nuxt project and used this: https://i18n.nuxtjs.org/docs/guide/custom-paths It works combined with general i18n support, which React has packages available for. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Today I came to the conclusion I'm in need of i18n support for the routes created by tanstack (I'm using file-based config but that doesn't really matter).
So in short, when I, for example, create file
organization.lazy.tsx
in theroutes
folder and run the cli, it will generate the following Route:But then the url will always be https://my.domain.ext/organizations.
For the above, I would like to have the ability to navigate to the same route using aliases:
I do know there is something like routeMasks, but that would not work for deeplinks. Also I know the possiblity to create separate routes for each value I want to support and point it to the same component, but that would be cumbersome and create a lot of unnecessary routes. It would be nice to have the ability to configure it in the Route itself, for example define a list of
aliases
.A very simple example would be something like this:
This is just a very simple example. Perhaps something more robust regarding i18n would be more in place, like defining a more complex config using the locales and the corresponding translations of each route.
I'm curious what your opinions or ideas on this subject are.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions