-
-
Notifications
You must be signed in to change notification settings - Fork 516
Description
Describe the feature
I'm trying to find a more streamlined way to handle URL-based i18n locale routing with strategy: 'prefix' in my Nuxt applications. Currently, it seems that localePath() needs to be explicitly set on every link, which can be a bit repetitive.
I've explored using middleware to automatically manage this, but it appears nuxt/i18n's routing logic takes precedence and overrides these attempts with a default.
I'm sure there's a valid technical reason for this behavior, given the complexity of i18n implementation. However, I'm curious if there might be an alternative approach, perhaps leveraging middleware or a plugin within the nuxt/i18n package itself, to automatically apply the correct locale paths without requiring manual intervention on every link. Any insights into the underlying logic or potential solutions would be greatly appreciated!
Additional information
- Would you be willing to help implement this feature?
- Could this feature be implemented as a module?
Final checks
- Read the contribution guide (The contribution guideline of nuxt-modules/i18n is compliant with Nuxt too).
- Check existing discussions and issues.