Merge "The 4th Database::select() parameter is the function name. The ORDER BY should...
[mediawiki.git] / languages / classes / LanguageDsb.php
blob1fae25cf0c9dffded0d1445acf3deba5d06cfa10
1 <?php
3 /** Lower Sorbian (Dolnoserbski)
5 * @ingroup Language
6 */
7 class LanguageDsb extends Language {
9 /**
10 * Convert from the nominative form of a noun to some other case
11 * Invoked with {{grammar:case|word}}
13 * @param $word string
14 * @param $case string
15 * @return string
17 function convertGrammar( $word, $case ) {
18 global $wgGrammarForms;
19 if ( isset( $wgGrammarForms['dsb'][$case][$word] ) ) {
20 return $wgGrammarForms['dsb'][$case][$word];
23 switch ( $case ) {
24 case 'instrumental': # instrumental
25 $word = 'z ' . $word;
26 case 'lokatiw': # lokatiw
27 $word = 'wo ' . $word;
28 break;
31 return $word; # this will return the original value for 'nominatiw' (nominativ) and all undefined case values
34 /**
35 * @param $count int
36 * @param $forms array
37 * @return string
39 function convertPlural( $count, $forms ) {
40 if ( !count( $forms ) ) { return ''; }
41 $forms = $this->preConvertPlural( $forms, 4 );
43 switch ( abs( $count ) % 100 ) {
44 case 1: return $forms[0]; // singular
45 case 2: return $forms[1]; // dual
46 case 3:
47 case 4: return $forms[2]; // plural
48 default: return $forms[3]; // pluralgen