MediaWiki  REL1_19
LanguageBe.php
Go to the documentation of this file.
00001 <?php
00015 class LanguageBe extends Language {
00016 
00023         function convertPlural( $count, $forms ) {
00024                 if ( !count( $forms ) ) { return ''; }
00025                 // @todo FIXME: CLDR defines 4 plural forms instead of 3
00026                 //        http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
00027                 $forms = $this->preConvertPlural( $forms, 3 );
00028 
00029                 if ( $count > 10 && floor( ( $count % 100 ) / 10 ) == 1 ) {
00030                         return $forms[2];
00031                 } else {
00032                         switch ( $count % 10 ) {
00033                                 case 1:  return $forms[0];
00034                                 case 2:
00035                                 case 3:
00036                                 case 4:  return $forms[1];
00037                                 default: return $forms[2];
00038                         }
00039                 }
00040         }
00041 }