Closed nelsonprsousa closed 1 year ago
Hi Nelson,
when translating paths in rewriteRoutes
, you must use path segments:
export const rewriteRoutes = [
{
prefix: 'pt',
paths: {
'vacations': 'ferias',
'packages': 'pacotes'
// other paths
}
}
]
Then slugs should work out of the box: https://qwik.builder.io/docs/routing/#rewrite-routes
Indeed, I thought we had to integrate somehow with this lib. Awesome, thanks for your help. 🙏
Scenario
Currently, it is possible to localize routing with the static URL rewriting feature (
en
->pt
):/home
->/inicio
/about-us
->/sobre-nos
However, we would like to localize dynamic routing, with slugs. Example (
en
->pt
):/vacations/[countryName]/packages
->/ferias/[countryName]/pacotes
Attempt:
Request
Is it possible to have localized routing with dynamic URL rewriting? This should help with SEO on multiple scenarios.
Available to help and even submit a PR, after receiving feedback regarding this feature request (and some guidance would help 🙏 )
Thank you!