[Vuejs]-Nuxt I18n use localePath('/') in script setup

1👍

Try to use the useLocalePath composable from ‘vue-i18n-routing’ like :

import { useLocalePath } from 'vue-i18n-routing' //in my case it's auto-imported

const  localePath  = useLocalePath()

console.log('Default path', localePath('blog'))
console.log('Deutch path', localePath('blog','de'))

Leave a comment