MediaWiki
REL1_20
|
00001 <?php 00029 class LanguageHr extends Language { 00030 00036 function convertPlural( $count, $forms ) { 00037 if ( !count( $forms ) ) { return ''; } 00038 // @todo FIXME: CLDR defines 4 plural forms instead of 3. Plural for for decimals is missing. 00039 // http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html 00040 $forms = $this->preConvertPlural( $forms, 3 ); 00041 00042 if ( $count > 10 && floor( ( $count % 100 ) / 10 ) == 1 ) { 00043 return $forms[2]; 00044 } else { 00045 switch ( $count % 10 ) { 00046 case 1: return $forms[0]; 00047 case 2: 00048 case 3: 00049 case 4: return $forms[1]; 00050 default: return $forms[2]; 00051 } 00052 } 00053 } 00054 }