LanguagePl.php 497 B

12345678910111213141516171819202122232425
  1. <?php
  2. /** Polish (polski)
  3. *
  4. * @ingroup Language
  5. */
  6. class LanguagePl extends Language {
  7. function convertPlural( $count, $forms ) {
  8. if ( !count($forms) ) { return ''; }
  9. $forms = $this->preConvertPlural( $forms, 3 );
  10. $count = abs( $count );
  11. if ( $count == 1 )
  12. return $forms[0]; // singular
  13. switch ( $count % 10 ) {
  14. case 2:
  15. case 3:
  16. case 4:
  17. if ( $count / 10 % 10 != 1 )
  18. return $forms[1]; // plural
  19. default:
  20. return $forms[2]; // plural genitive
  21. }
  22. }
  23. }