LanguageDsb.php 1015 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /** Lower Sorbian (Dolnoserbski)
  3. *
  4. * @ingroup Language
  5. */
  6. class LanguageDsb extends Language {
  7. # Convert from the nominative form of a noun to some other case
  8. # Invoked with {{GRAMMAR:case|word}}
  9. function convertGrammar( $word, $case ) {
  10. global $wgGrammarForms;
  11. if ( isset( $wgGrammarForms['dsb'][$case][$word] ) ) {
  12. return $wgGrammarForms['dsb'][$case][$word];
  13. }
  14. switch ( $case ) {
  15. case 'instrumental': # instrumental
  16. $word = 'z ' . $word;
  17. case 'lokatiw': # lokatiw
  18. $word = 'wo ' . $word;
  19. break;
  20. }
  21. return $word; # this will return the original value for 'nominatiw' (nominativ) and all undefined case values
  22. }
  23. function convertPlural( $count, $forms ) {
  24. if ( !count($forms) ) { return ''; }
  25. $forms = $this->preConvertPlural( $forms, 4 );
  26. switch ( abs( $count ) % 100 ) {
  27. case 1: return $forms[0]; // singular
  28. case 2: return $forms[1]; // dual
  29. case 3:
  30. case 4: return $forms[2]; // plural
  31. default: return $forms[3]; // pluralgen
  32. }
  33. }
  34. }