Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-97513

Teach QLocale to recognise known aliases for languages and territories

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 6.2
    • Fix Version/s: None
    • Component/s: Core: Locales (i18n)
    • Labels:
      None
    • Platform/s:
      All

      Description

      Prompted by recent discussion on a code review:

      There are assorted international standards for language and territory codes, some with two letter codes, some three letter codes (e.g. ISO 639-2), possibly others. CLDR's common/supplemental/supplementalMetadata.xml contains a supplementalData/metadata/alias/ element that contains languageAlias, territoryAlias and (at least for now just one) scriptAlias elements (apparently generated by something called CountItems), 1144 of them in all (in v39), that would also be sensible sources of aliases for the tags used by CLDR and thus QLocale.
      Probably some of these can be filtered out by virtue of mapping to codes we don't actually support (due to CLDR providing no actual locale data for them).
      If we can obtain a suitably robust script-parseable source for data from other international standards, we could include data taken from these.

      Including suitably-designed alias tables for these in qlocale_data_p.h would enable QLocale to recognise these codes when parsing language, script and territory tags in locale specifications from some sources that we otherwise fail to understand, improving interoperability.

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              Eddy Edward Welbourne
              Reporter:
              Eddy Edward Welbourne
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes