LanguageBe.php 968 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /** Belarusian normative (Беларуская мова)
  3. *
  4. * This is still the version from Be-x-old, only duplicated for consistency of
  5. * plural and grammar functions. If there are errors please send a patch.
  6. *
  7. * @ingroup Language
  8. *
  9. * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
  10. * @bug 1638, 2135
  11. * @link http://be.wikipedia.org/wiki/Talk:LanguageBe.php
  12. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
  13. * @license http://www.gnu.org/copyleft/fdl.html GNU Free Documentation License
  14. */
  15. class LanguageBe extends Language {
  16. function convertPlural( $count, $forms ) {
  17. if ( !count($forms) ) { return ''; }
  18. $forms = $this->preConvertPlural( $forms, 3 );
  19. if ($count > 10 && floor(($count % 100) / 10) == 1) {
  20. return $forms[2];
  21. } else {
  22. switch ($count % 10) {
  23. case 1: return $forms[0];
  24. case 2:
  25. case 3:
  26. case 4: return $forms[1];
  27. default: return $forms[2];
  28. }
  29. }
  30. }
  31. }