Nuxt.js i18n custom route paths with page sub directories
-
I am using the nuxt.js i18n plugin, I want to add a custom route path. I checked their documentation and it was mentioned like this.
'services/web':{ en: '/web-application-development', it: '/web-applicatione' }
but when I add a route path, the navigation link is not working.
here is the code.
<NuxtLink :to="localePath({name:'services/web'})" class="nav-dropdown-link"> <img src="~/assets/imgs/nav-web-application.svg" alt="nav-web-application"> <span>{{ $t('navigationServiceWeb') }}</span> </NuxtLink>
-
Try this, i think in NUXT3 you have to call the name with dash(-) not slash(/)
<NuxtLink :to="localePath({name:'services-web'})" class="nav-dropdown-link"> </NuxtLink>