MediaWiki  REL1_19
LanguageMt.php
Go to the documentation of this file.
00001 <?php
00002 
00010 class LanguageMt extends Language {
00011 
00017         function convertPlural( $count, $forms ) {
00018                 if ( !count( $forms ) ) { return ''; }
00019 
00020                 $forms = $this->preConvertPlural( $forms, 4 );
00021 
00022                 if ( $count == 1 ) $index = 0;
00023                 elseif ( $count == 0 || ( $count % 100 > 1 && $count % 100 < 11 ) ) $index = 1;
00024                 elseif ( $count % 100 > 10 && $count % 100 < 20 ) $index = 2;
00025                 else $index = 3;
00026                 return $forms[$index];
00027         }
00028 }