Skip to content

A locale in this context is a comination of a language, a script and … #13261

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

Merged
merged 1 commit into from
Mar 2, 2020
Merged

A locale in this context is a comination of a language, a script and … #13261

merged 1 commit into from
Mar 2, 2020

Conversation

michaelKaefer
Copy link
Contributor

…a region

Copy link
Contributor

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

friendly ping @ro0NL, I would love to get your review on this PR 🙃

@javiereguiluz
Copy link
Member

What about using something similar to the Wikipedia definition of "locale":

A locale is the combination of a language, a region and some parameters that
define the interface preferences of the user (such as the language script, the
date and number formatting, etc.).

@michaelKaefer
Copy link
Contributor Author

michaelKaefer commented Feb 29, 2020

@javiereguiluz I think the definition on Wikipedia is to general for what is meant here. A locale here is almost always a combination of a language code, a country code and a script code and not the combination of a language code, a country code and some parameters. But anyway I changed the commit to this version.

@javiereguiluz
Copy link
Member

@michaelKaefer thanks for updating your contribution. I wasn't sure about this either ... but looking at Symfony Intl tests (https://github.com/symfony/intl/blob/master/Tests/Locale/LocaleTest.php) it looks like we support locales with attributes like script, currency formatting, etc.

@michaelKaefer
Copy link
Contributor Author

@javiereguiluz Ok, thank you. But Locales::getNames() only returns combinations of languages, scripts and countries, or? No currencies, no number formats, etc. That is what my commit was targeting. But anyway I already changed it to some parameters.

@javiereguiluz
Copy link
Member

@michaelKaefer nice work! ... and thanks for your patience during the review process

@javiereguiluz javiereguiluz merged commit 342417e into symfony:5.0 Mar 2, 2020
@michaelKaefer michaelKaefer deleted the patch-1 branch March 2, 2020 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants