nuxt-modules / i18n

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

Why is this being done here? #3134

Closed gjfei closed 2 months ago

gjfei commented 2 months 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 months 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