adbrosaci / vue-lang-router

Vue language routing with (optional) localized URLs.
MIT License
66 stars 8 forks source link

How to translate an dynamic url ? #10

Closed joffreyBerrier closed 3 years ago

joffreyBerrier commented 3 years ago

I want to translate this url : path: '/house/:id/detail'

But I don't understand how i can translate them, I have tried three options but nothing works

"house/:id/detail": "maison/:id/coucou"
"houseDetail": "maison/:id/coucou"
"house-detail": "maison/:id/coucou"

Any help :) ?

radek-altof commented 3 years ago

Hi @joffreyBerrier, you should translate individual parts of URL separately, so probably this is what you're looking for:

{
  "house": "maison",
  "detail": "coucou"
}