Is there any way to update Vue-router routes programmatically without reloading the page?
I'm loading different route paths based on the language that is selected, e.g.:
{ path: '/' + i18n.t('url_welcome'), name: 'welcome, component: Welcome },
Unfortunately, route paths don't update automatically when the language is changed.
Dynamic routing is achieved mainly via two functions: router.addRoute() and router.removeRoute().
https://router.vuejs.org/guide/advanced/dynamic-routing.html#adding-routes
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With