Introduce a method in Locale class to return the language tags as per RFC 5646 convention

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 21
    • Affects Version/s: None
    • Component/s: core-libs
    • None

      The current implemented methods Locale.filter/lookup() and Locale.filterTags/lookupTag() return lowercased language tags. The language tags should be treated in case-insensitive manner, so the tag "mn-Cyrl-MN" is not distinct from "MN-cYRL-mn" or "mN-cYrL-Mn" (or any other combination) and each of these variations conveys the same meaning, but RFC 5646 recommends that the language tags should follow some convention.

         These conventions include:

         o [ISO639-1] recommends that language codes be written in lowercase
            ('mn' Mongolian).

         o [ISO15924] recommends that script codes use lowercase with the
            initial letter capitalized ('Cyrl' Cyrillic).

         o [ISO3166-1] recommends that country codes be capitalized ('MN'
            Mongolia).

      Changing the the existing implementation is not backward compatible and may break some applications. So, a new method should be introduced in the Locale class which can take an input string of language tags and convert their case convention as per RFC 5646 standard.

            Assignee:
            Justin Lu
            Reporter:
            Nishit Jain
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: