Skip to content
Snippets Groups Projects
  • Frank Yung-Fong Tang's avatar
    642929b2
    correct value that matches languageAlias in · 642929b2
    Frank Yung-Fong Tang authored
    Per  https://tc39.github.io/ecma402/#sec-canonicalizelanguagetag
    6.2.3 CanonicalizeLanguageTag ( locale )
    The CanonicalizeLanguageTag abstract operation returns the canonical and case-regularized form of the locale argument (which must be a String value that is a structurally valid Unicode BCP 47 Locale Identifier as verified by the IsStructurallyValidLanguageTag abstract operation). A conforming implementation shall take the steps specified in the “BCP 47 Language Tag to Unicode BCP 47 Locale Identifier” algorithm, from Unicode Technical Standard #35 LDML § 3.3.1 BCP 47 Language Tag Conversion.
    
    And
    http://unicode.org/reports/tr35/#BCP_47_Language_Tag_Conversion
    "
    2. If the BCP 47 primary language subtag matches the type attribute of a languageAlias element in Supplemental Data, replace the language subtag with the replacement value.
    If there are additional subtags in the replacement value, add them to the result, but only if there is no corresponding subtag already in the tag.
    "
    and
    https://www.unicode.org/repos/cldr/trunk/common/supplemental/supplementalMetadata.xml
    ...
    <languageAlias type="aar" replacement="aa" reason="overlong"/>
     <!--  [Afar]  -->
    ...
    <languageAlias type="ces" replacement="cs" reason="overlong"/>
     <!--  [Czech]  -->
    ...
    <languageAlias type="heb" replacement="he" reason="overlong"/>
     <!--  [Hebrew]  -->
    642929b2
    History
    correct value that matches languageAlias in
    Frank Yung-Fong Tang authored
    Per  https://tc39.github.io/ecma402/#sec-canonicalizelanguagetag
    6.2.3 CanonicalizeLanguageTag ( locale )
    The CanonicalizeLanguageTag abstract operation returns the canonical and case-regularized form of the locale argument (which must be a String value that is a structurally valid Unicode BCP 47 Locale Identifier as verified by the IsStructurallyValidLanguageTag abstract operation). A conforming implementation shall take the steps specified in the “BCP 47 Language Tag to Unicode BCP 47 Locale Identifier” algorithm, from Unicode Technical Standard #35 LDML § 3.3.1 BCP 47 Language Tag Conversion.
    
    And
    http://unicode.org/reports/tr35/#BCP_47_Language_Tag_Conversion
    "
    2. If the BCP 47 primary language subtag matches the type attribute of a languageAlias element in Supplemental Data, replace the language subtag with the replacement value.
    If there are additional subtags in the replacement value, add them to the result, but only if there is no corresponding subtag already in the tag.
    "
    and
    https://www.unicode.org/repos/cldr/trunk/common/supplemental/supplementalMetadata.xml
    ...
    <languageAlias type="aar" replacement="aa" reason="overlong"/>
     <!--  [Afar]  -->
    ...
    <languageAlias type="ces" replacement="cs" reason="overlong"/>
     <!--  [Czech]  -->
    ...
    <languageAlias type="heb" replacement="he" reason="overlong"/>
     <!--  [Hebrew]  -->