Skip to content

[RFC][Intl] Support alias locales by default #31022

Closed
@ro0NL

Description

@ro0NL

In #28846 i noticed the following logic:

if (!isset($locales[$value]) && !\in_array($value, $localeBundle->getAliases(), true)) {

Here the LocaleValidator allows both locales and aliases. I think it makes sense.

I propose to support aliases by default in the new Locales data accessor

  • Locales::exists($alias)
  • Locales::getName($alias)
  • Locales::getAliased($alias): ?string

Metadata

Metadata

Assignees

No one assigned

    Labels

    IntlRFCRFC = Request For Comments (proposals about features that you want to be discussed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions