MediaWiki  REL1_20
LanguageRo.php
Go to the documentation of this file.
00001 <?php
00029 class LanguageRo 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#ro
00039                 if ( !count( $forms ) ) { return ''; }
00040 
00041                 $forms = $this->preConvertPlural( $forms, 3 );
00042 
00043                 if ( $count == 1 ) {
00044                         $index = 0;
00045                 } elseif ( $count == 0 || ( $count % 100 > 0 && $count % 100 < 20 ) ) {
00046                         $index = 1;
00047                 } else {
00048                         $index = 2;
00049                 }
00050                 return $forms[$index];
00051         }
00052 }