qt5base-lts/util/locale_database
Ievgenii Meshcheriakov 4f53c703e4 QLocale: Extend support for language codes
This commit extends functionality for QLocale::codeToLanguage()
and QLocale::languageToCode() by adding an additional argument
that allows selection of the ISO 639 code-set to consider for
those operations.

The following ISO 639 codes are supported:
    * Part 1
    * Part 2 bibliographic
    * Part 2 terminological
    * Part 3

As a result of this change the codeToLanguage() overload without
the additional argument now returns a Language value if it matches
any know code. Previously a valid language was returned only if
the function argument matched the first code defined for that
language from the above list.

[ChangeLog][QtCore][QLocale] Added overloads for codeToLanguage()
and languageToCode() that support specifying which ISO 639 codes
to consider.

Fixes: QTBUG-98129
Change-Id: I4da8a89e2e68a673cf63a621359cded609873fa2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-12-09 03:45:08 +01:00
..
testlocales Add the "Territory" enumerated type for QLocale 2021-04-15 20:17:49 +08:00
cldr2qlocalexml.py Use a HTTPS URL for the CLDR download link 2021-11-05 19:32:23 +01:00
cldr2qtimezone.py locale_database: Add entry for 'South Sudan Standard Time' 2021-11-10 00:36:11 +01:00
cldr.py locale_database: Use pathlib to manipulate paths in Python code 2021-07-19 22:05:54 +02:00
dateconverter.py Convert CLDR scripts to Python 3 2021-07-15 17:06:53 +02:00
enumdata.py QLocale: Add support for Kaingang and Nheengatu languages 2021-11-10 00:36:12 +01:00
formattags.txt
iso639_3.py QLocale: Extend support for language codes 2021-12-09 03:45:08 +01:00
ldml.py locale_database: Use f-strings in Python code 2021-07-16 19:04:20 +02:00
localetools.py locale_database: Use context manager interface to update source files 2021-07-20 16:51:51 +02:00
qlocalexml2cpp.py QLocale: Extend support for language codes 2021-12-09 03:45:08 +01:00
qlocalexml.py locale_database: Use f-strings in Python code 2021-07-16 19:04:20 +02:00
qlocalexml.rnc locale_database: Add schema for intermediate locale data files 2021-07-16 18:27:28 +02:00
README Update CLDR to v37, adding Nigerian Pidgin as a new language 2020-10-26 15:28:59 +02:00

locale_database is used to generate qlocale data from CLDR.

CLDR is the Common Locale Data Repository, a database for localized
data (like date formats, country names etc).  It is provided by the
Unicode consortium.

See cldr2qlocalexml.py for how to run it and qlocalexml2cpp.py to
update the locale data tables (principally text/qlocale_data_p.h and
time/q*calendar_data_p.h under src/corelib/). See enumdata.py for when
and how to update the data it provides. You shall definitely need to
pass --no-verify or -n to git commit for these changes.

See cldr2qtimezone.py on how to update tables of Windows-specific
names for zones and UTC-offset zone names.