The useLocalePath()
composable returns a function that resolves a path according to the current locale.
declare function useLocalePath(
options?: I18nCommonRoutingOptionsWithComposable
): (route: RawLocation | RouteLocation, locale?: Locale) => string
<script setup>
const localePath = useLocalePath()
</script>
<template>
<NuxtLink :to="localePath('index')">{{ $t('home') }}</NuxtLink>
</template>