nuxt-modules / i18n

I18n module for Nuxt
https://i18n.nuxtjs.org
MIT License
1.7k stars 473 forks source link

Why is this being done here? #3134

Closed gjfei closed 2 hours ago

gjfei commented 2 hours ago

Environment

image

Reproduction

image

Describe the bug

locales [ { code: 'en-us', iso: 'en', }, { code: 'vi', iso: 'vn', }, ] defaultLocale en

routers /about /home

If the current path is "en-us/about", obtaining the path of "home" through useLocalePath will result in "/home". How to get "en-us/home"

Additional context

No response

Logs

No response

BobbieGoede commented 2 hours ago

This sounds more like a question so I will convert this to a discussion. Also, without seeing your configuration and function usage there's no way I can understand your question, can you provide either a minimal reproduction or your i18n config and a code snippet that triggers your issue?

Please format your code snippets like so:

```ts
//code here