I want URLs having 2 different patterns to point to the same page:
/en/car/1, /voiture/1/en/latest/2, /nouveau/2(both should render the same /pages/cars/show.vue component)
Could this be implement with the current version? And I wonder how both routes: { ... } object and localePath( ... ) call should look.
Thanks for this module.
Hi @adi-zz
This is currently not possible with current version but it would certainly be an interesting feature.
In the meantime you could probably "hack" your way to a solution by using other pages that export the page's module you'd like to translate, kinda like it's done in Nuxt's i18n official example: https://nuxtjs.org/examples/i18n
How can you use this when you have dynamic routes, i mean how do you pass params to a vue page
I was able to achieve this with declaring another path in extendRoutes instead of using alias by extending router module
extendRoutes (routes) {
routes.push({name: 'old-path', path: '/old-path', component: '~pages/index.vue'})
}
I hope this i will be useful to others.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
I was able to achieve this with declaring another path in extendRoutes instead of using
aliasby extending router moduleI hope this i will be useful to others.