Lanka Developers Community

    Lanka Developers

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Shop

    Nuxt.js i18n custom route paths with page sub directories

    Web Development
    nuxtjs vuejs
    2
    2
    782
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Nubelle
      Nubelle Web Development last edited by Nubelle

      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>
      
      axistecheu 1 Reply Last reply Reply Quote 0
      • axistecheu
        axistecheu @Nubelle last edited by axistecheu

        @Nubelle

        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>
        
        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post

        0
        Online

        3.7k
        Users

        1.3k
        Topics

        5.3k
        Posts

        • Privacy
        • Terms & Conditions
        • Donate

        © Copyrights and All right reserved Lanka Developers Community

        Powered by Axis Technologies (PVT) Ltd

        Made with in Sri Lanka

        | |