ZF-11728: Incorrect Slovenian country code in Zend_Translate_Plural
Description
On line 170 of Zend_Translate_Plural the country code 'sl' is given for the plural format on line 171:
case 'sl':
return ($number % 100 == 1) ? 0 : (($number % 100 == 2) ? 1 : ((($number % 100 == 3) || ($number % 100 == 4)) ? 2 : 3));
The country code 'sl' stands for Sierra Leone, while, according to the GNU gettext documentation, the given plural format should reflect Slavic languages. The official language of Sierra Leone is English, so 'sl' should probably be 'si', which is the correct country code for Slovenia (ISO 3166 country codes).
Comments
Posted by Thomas Weidner (thomas) on 2011-09-10T07:31:27.000+0000
You missunderstood the code. Zend_Translate does translations... this means it works on languages not on country codes. According to unicode "sl" stands for the language "slovenish", whereas "SL" (note the uppercase notation) stands as you wrote for Sierra Leone. As plural forms are always used on languages (plurals are not country related but only related to a language) the code is designed as wished.
Posted by Thomas Weidner (thomas) on 2011-09-10T07:32:08.000+0000
Closing as non-issue according to above reply
Posted by Sebastiaan Wiersema (sebastiaan) on 2011-09-10T08:25:05.000+0000
Ah, that makes sense. I stand corrected.