-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Improve OS::get_locale()
and documentation.
#40708
Conversation
Does this PR supersede #37246? |
6a3f81c
to
ca8e012
Compare
ca8e012
to
3a9400e
Compare
… and use system macros instead of bitwise AND. Add locale format info to the documentation.
3a9400e
to
f797e1c
Compare
[code]Script[/code] - optional, 4 letter [url=https://en.wikipedia.org/wiki/ISO_15924]script code[/url], in title case. | ||
[code]COUNTRY[/code] - optional, 2 or 3 letter [url=https://en.wikipedia.org/wiki/ISO_3166-1]country code[/url], in upper case. | ||
[code]VARIANT[/code] - optional, language variant, region and sort order. Variant can have any number of underscored key words. | ||
[code]extra[/code] - optional, semicolon separated list of additional key words. Currency, calendar, sort order and numbering system information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing some of those are OS-specific, maybe this should be documented too? Or do all OSes follow the same format aside from some using -
and others using _
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The overall pattern is valid for all OSes, but none of the locales have all parts. Only @
is Linux specific, the rest can be encountered on any OS.
Thanks! |
Ah I merged without waiting for feedback on my above comment, I thought I was looking at another PR :P |
Cherry-picked for 3.4. |
On macOS and Windows, replace
-
with_
.On Windows use system macros instead of bitwise AND.
Add locale format info to the documentation.
Related issue #40703
Fixes #37203