Monthly Archives: May 2018

glibc 2.27: New and Updated Locales

See also: glibc 2.26: New and Updated Locales.

The new version glibc 2.27 has been released on February 1, 2018 (or February 2, depending on your time zone). This is the much belated report of the new changes in locale support.

Collation

Major rework has been started on the correct alphabetic sorting using ISO 14651:2016 standard (click here to download a publicly available version). It has been finished only after the glibc 2.27 release but the work in progress had fixed collation rules in many languages including Mandarin Chinese (Taiwan), Croatian, Czech, Estonian, Canadian French, Icelandic, Latvian, Lithuanian, Polish, Turkish, and Upper Sorbian. Much of this work has been completed or at least started during the Internationalization FAD and therefore it has been sponsored by Fedora Project. Big thanks to Mike Fabian for his great contribution!

Correct Date Formats

Another major change which must be mentioned here is the introduction of date formats using the correct grammar forms in inflected languages. This feature needs a separate article which will be written later. Shortly: from now the glibc functions nl_langinfo() and strftime() from now can support not only two forms of month names (full and abbreviated) but four (for months as used in dates, which often means a genitive grammar case in inflected languages, and for months as used standalone, which often means a nominative case). For example, in Polish language the month May is maj but in order to express a date it is obligatory to use a genitive case: 29 maja. The feature is optional which means that the languages which don’t need it will not see any change.

Introduction of a software feature does not cause any changes until the locale data using it is provided. First Polish locale data has been updated, shortly followed by Ukrainian, and then Russian, Greek, Belarusian, Lithuanian, and finally Croatian. Ukrainian locale data has been using alternative digits feature to provide month names in a genitive case for last 11 years. This solution has been recognized as a dirty hack and removed, also it seems it was not widely known and therefore not widely used by actual users.

The change has appeared in the upstream repository only 10 days before the final release, there was not enough time to add more languages. The next release will include the updated locale data for Catalan, Czech, and few other languages.

New Locales

As every release, this adds new locales. There are 6 new languages: Kabyle, Karbi, Mauritian Creole (Morisyen), Miskito, Shan, and Yau (also called Uruwa), also 3 new variants: Bhojpuri for Nepal, English for the Seychelles, and Valencian (dialect of Catalan).

Kabyle is a language spoken by about 5 million people in Algeria, this makes it the third most spoken language of the country. Karbi is a minority language spoken by about 400,000 people in north-eastern India and north-eastern Bangladesh. Morisyen is the most spoken language of Mauritius (about 1 million speakers). Miskito is a native language spoken by about 150,000 people in Nicaragua and Honduras. Shan is a language spoken by more than 3 million people in Myanmar, this is the second most spoken language of the country. Yau is the smallest language added in this release, spoken by about 1,700 people in Papua New Guinea.

Bhojpuri is the third most spoken language of Nepal (6% of total population). It is also spoken in India and as such has been supported by glibc previously. Valencian Catalan language (ca_ES@valencia) is spoken by about 2.3 million people in Valencia, a community in Spain. It has been supported by some Linux distributions as a downstream patch for many years. From now it is officially in glibc. English does not need its introduction: of course, it has been present in computer industry since forever. It is also an official language of Seychelles along with French and Seychellois Creole.

Lots of Minor Fixes

There are also many other minor bug fixes in this release. The localized messages for yes and no and single-letter answers have been updated in many locales. Chinese, Japanese, and Korean accept full-width Y and N characters as valid answers. Some redundant data have been removed, for example all monetary data for all locales of India are now dynamically copied from Hindi. If there are bugs detected or changes are introduced in future it will be easy to change only one file. More updates include monetary and numerical formats, also less used data like phone number formats, address data, or ISBN numbers have been updated in many locales.

Finally, most of the Unicode sequences (like: <Uxxxx> where each x means a hexadecimal digit) in a source code of locale data have been replaced with ASCII characters, wherever possible. Nowadays nobody remembers why these sequences were required but plain ASCII turned out to be working perfectly. Of course, the characters from outside the basic ASCII range still remain encoded as the Unicode sequences.