Closed dsamojlenko closed 4 years ago
Thinking it would be better do route setup more grouped like this:
const routes = [
{ name: 'start', path : {"en", "/start" , "fr", "/debut"}},
];
The helper functions can still do the lookup based on "start" and path would get returned via the helpers using the local.
In case it's a string, we can treat it as if both are the same.
I have a preliminary version of this based on #82.
Would like to see if we can improve on the bilingual routing.
Currently, we have a single route with a lang param to switch languages, so a french url would look like:
/personal?lang=fr
An obvious issue is the unilingual url segment
personal
. Also, query params are kinda ugly.Would be better:
/en/personal
/fr/personnel
(we'd need the language prefix since some words are same english/french, ie
confirmation
)So, not sure exactly how to pull this off, but to start we'd need to revisit the config/routes file. Maybe something like this: