MediaWiki
REL1_19
|
00001 <?php 00007 class LanguageMo extends Language { 00008 00014 function convertPlural( $count, $forms ) { 00015 // Plural rules per 00016 // http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#mo 00017 // Identical to Romanian (ro). 00018 if ( !count( $forms ) ) { return ''; } 00019 00020 $forms = $this->preConvertPlural( $forms, 3 ); 00021 00022 if ( $count == 1 ) { 00023 $index = 0; 00024 } elseif ( $count == 0 || ( $count % 100 > 0 && $count % 100 < 20 ) ) { 00025 $index = 1; 00026 } else { 00027 $index = 2; 00028 } 00029 return $forms[$index]; 00030 } 00031 }