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

fix: When using domain-based routing, use defaultLocale of a domain instead of the top-level one in case no other locale matches better on the domain #1000

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

amannn
Copy link
Owner

@amannn amannn commented Apr 17, 2024

Fixes #998

Note that the defaultLocale of a domain is used if no other locale matches better. However, if a domain supports multiple locales, the best-matching one will be selected based on the accept-language header. If you want to always use the defaultLocale in case no prefix is provided, then you can turn off localeDetection.

… instead of the top-level one in case no other locale matches better on the domain
@amannn amannn marked this pull request as ready for review April 17, 2024 14:38
Copy link

vercel bot commented Apr 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-intl-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 17, 2024 3:04pm
next-intl-example-app-router ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 17, 2024 3:04pm

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

Successfully merging this pull request may close these issues.

defaultLocale of domain ignored if defaultLocale set at top-level
1 participant