Hello there! I am working on localizing numerical values in some Wikimedia applications (XTools[0], namely). I've been using PHP's NumberFormatter[1] and it works great for some languages like Arabic and Persian.
However Kurdish, specifically ckb (as in ckb.wikipedia.org[2]), is apparently missing from this PHP library. I've searched the whole internet over, and can't figure out how I am meant to install it. Evidently it boils down to what languages are installed on your machine, which I think under a Unix-like system is "locale -a". Indeed I don't see ckb or any of the other Kurdish variants like ku, kur, kmr, and sdh. The same is true when I run this command on Toolfroge/VPS, where my tools are hosted.
Knowing that Kurdish Wikipedia[2] is a thing, and that MediaWiki is built in PHP, I was hoping someone here would know what needs to be done to support Kurdish in my application? I have all the Kurdish message translations, via translatewiki, I just need to localize the numerical values using the standard PHP NumberFormatter.
[0] https://xtools.wmflabs.org [1] https://secure.php.net/manual/en/class.numberformatter.php [2] https://ckb.wikipedia.org
Many thanks for your time,
~MusikAnimal
Leon Ziemba, 09/03/2018 09:33:
Hello there! I am working on localizing numerical values in some Wikimedia applications (XTools[0], namely). I've been using PHP's NumberFormatter[1] and it works great for some languages like Arabic and Persian.
I thought NumberFormatter was supposed to use the PHP library which ships the ICU data derived from CLDR. The documentation page seems to hint so as well.
The first step would be to check whether the data you need is in CLDR: https://www.unicode.org/cldr/charts/latest/summary/ckb.html
Then check if it's propagated downstream from there. Maybe it's just an older version somewhere.
Note that one wishlist item is to make MediaWiki's own i18n "library" and its CLDR-derived components more readily available to other PHP projects of ours, to reduce such duplicate work or incompatible l10n formats. https://www.mediawiki.org/wiki/Language_goals_and_wishlist#Librarization_of_MediaWiki_i18n
The current state means that many pieces of code developed outside MediaWiki's PHP tend to have a relatively poor i18n support (for gender, plural and even basic things like numbers).
Federico
mediawiki-i18n@lists.wikimedia.org