Skip to content

feat: Add required affinity option to locales resolver#28

Open
ericfjosne wants to merge 3 commits into
mainfrom
feat-Add-requiredAffinity-option-to-LocalesResolver
Open

feat: Add required affinity option to locales resolver#28
ericfjosne wants to merge 3 commits into
mainfrom
feat-Add-requiredAffinity-option-to-LocalesResolver

Conversation

@ericfjosne
Copy link
Copy Markdown
Collaborator

We are hitting an issue with the current setup, where the default behavior for the ICU LocaleMatcher promotes locales which are too distant from what we consider as an acceptable best match.

Examples:

  • Norwegian Bokmål nb is promoted as best matching locale for Danish da.
  • Indonesian id gets promoted as best matching locale for Malay ms.
  • Russian ru gets promoted as best matching locale for Kazakh kk and Mongolian mn.

We would like to enable some level of control over the matching logic. We suggest adding a new requiredLocaleAffinity configuration option, which builds on the locale affinity logic implemented previously.

In order to not break existing integrations, we need to set a default value for this new configuration option. We decided to set it to MUTUALLY_INTELLIGIBLE define over here.

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.

1 participant