MediaWiki  REL1_19
LanguageRo.php
Go to the documentation of this file.
00001 <?php
00007 class LanguageRo 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#ro
00017                 if ( !count( $forms ) ) { return ''; }
00018 
00019                 $forms = $this->preConvertPlural( $forms, 3 );
00020 
00021                 if ( $count == 1 ) {
00022                         $index = 0;
00023                 } elseif ( $count == 0 || ( $count % 100 > 0 && $count % 100 < 20 ) ) {
00024                         $index = 1;
00025                 } else {
00026                         $index = 2;
00027                 }
00028                 return $forms[$index];
00029         }
00030 }