MediaWiki  REL1_20
LanguageMo.php
Go to the documentation of this file.
00001 <?php
00029 class LanguageMo extends Language {
00030 
00036         function convertPlural( $count, $forms ) {
00037                 // Plural rules per
00038                 // http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html#mo
00039                 // Identical to Romanian (ro).
00040                 if ( !count( $forms ) ) { return ''; }
00041 
00042                 $forms = $this->preConvertPlural( $forms, 3 );
00043 
00044                 if ( $count == 1 ) {
00045                         $index = 0;
00046                 } elseif ( $count == 0 || ( $count % 100 > 0 && $count % 100 < 20 ) ) {
00047                         $index = 1;
00048                 } else {
00049                         $index = 2;
00050                 }
00051                 return $forms[$index];
00052         }
00053 }