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

[Intl] Excludes locale from language codes (split localized language names) #33148

Open
wants to merge 4 commits into
base: 4.4
from

Conversation

@ro0NL
Copy link
Contributor

commented Aug 13, 2019

Q A
Branch? 4.4
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #33146
License MIT
Doc PR symfony/symfony-docs#...

(includes #33140)

@ro0NL ro0NL force-pushed the ro0NL:intl-lang-locale branch from b77d511 to f56d9ca Aug 13, 2019

return self::readEntry(['LocalizedNames', $language], $displayLocale);
} catch (MissingResourceException $e) {
if (false !== $i = strpos($language, '_')) {
return self::readEntry(['Names', substr($language, 0, $i)], $displayLocale);

This comment has been minimized.

Copy link
@TerjeBr

TerjeBr Aug 13, 2019

May be make it a recursive function and call self::getName here? That would resolve the case if you have 2 underscores.

This comment has been minimized.

Copy link
@ro0NL

ro0NL Aug 14, 2019

Author Contributor

i see , conceptually we can have e.g. en_AU_SomeScript where we need to try en_AU still ... 👍

i like to finish #33140 first, and get a confirmation on the target branch :)

@ro0NL

This comment has been minimized.

Copy link
Contributor Author

commented Aug 14, 2019

if this is decided for 3.4, then 4.4 needs another PR to patch getAlpha3Name as well

edit: actually no, we should do 4.4 (we qualified excluding codes a new feature before as well (https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/Intl/CHANGELOG.md)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.