Skip to content

[Proposal] Make an API for locale negotiation #513

@longlho

Description

@longlho

Resolving from a list of requested locales (via Accept-Languages header for example) to a list of supported locales for a certain website. See vercel/next.js#18676 for example.

Existing locale matching libraries are fairly rudimentary (exact match only). We already have LookupMatcher/BestAvailableLocale/ResolveLocale abstract operations that take into account extensions as well so IMO we should make a top level API for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    User PreferencesRelated to user preferencesc: localeComponent: locale identifierss: commentStatus: more info is needed to move forward

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions