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

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.

Closing as non-issue according to above reply

Ah, that makes sense. I stand corrected.