LanguageMt.php 469 B

12345678910111213141516171819202122
  1. <?php
  2. /** Maltese (Malti)
  3. *
  4. * @ingroup Language
  5. *
  6. * @author Niklas Laxström
  7. */
  8. class LanguageMt extends Language {
  9. function convertPlural( $count, $forms ) {
  10. if ( !count($forms) ) { return ''; }
  11. $forms = $this->preConvertPlural( $forms, 4 );
  12. if ( $count === 1 ) $index = 0;
  13. elseif ( $count === 0 || ( $count%100>1 && $count%100<11) ) $index = 1;
  14. elseif ( $count%100>10 && $count%100<20 ) $index = 2;
  15. else $index = 3;
  16. return $forms[$index];
  17. }
  18. }