mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:08:12 +00:00
![]() Unicode TR35 defines how locale subtag aliases should be emplaced when converting a locale to canonical form. For most subtags, it is a simple substitution. Language subtags depend on context; for example, the language "sh" should become "sr-Latn", but if the original locale has a script subtag already ("sh-Cyrl"), then only the language subtag of the alias should be taken ("sr-Latn"). To facilitate this, we now make two passes when canonicalizing a locale. In the first pass, we convert the LocaleID structure to canonical syntax (where the conversions all happen in-place). In the second pass, we form the canonical string based on the canonical syntax. |
||
---|---|---|
.. | ||
CharacterTypes.cpp | ||
CharacterTypes.h | ||
CMakeLists.txt | ||
Forward.h | ||
Locale.cpp | ||
Locale.h |