Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per page locales #3056

Open
2 of 4 tasks
martinsjek opened this issue Aug 9, 2024 · 2 comments
Open
2 of 4 tasks

Per page locales #3056

martinsjek opened this issue Aug 9, 2024 · 2 comments

Comments

@martinsjek
Copy link

Describe the feature

Hi,

Let's say i have a website with only two locales: EN and DE.
I have 200 unique pages that use these locales.

But i have a page that will also use FR, IT locales.

Would there be a way to provide per-page locales?
Because now all routes will generate for 4 locales and I need to set up middleware for them to go 404.

Regards

Additional information

  • Would you be willing to help implement this feature?
  • Could this feature be implemented as a module?

Final checks

@BobbieGoede
Copy link
Collaborator

This seems like a bit of a niche use case, do you have suggestions on how this would be configurable if this were a feature?

@martinsjek
Copy link
Author

@BobbieGoede
Maybe as function inside a page?

Nuxt currently have definePageMeta. Maybe sometinhg like that?

I would suggest something like: defineI18nPageMeta({ locales: LocaleObject[] }).
Which would override locales for this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants