2 /** Upper Sorbian (Hornjoserbsce)
7 class LanguageHsb extends Language {
9 # Convert from the nominative form of a noun to some other case
10 # Invoked with {{GRAMMAR:case|word}}
12 function convertGrammar( $word, $case ) {
13 global $wgGrammarForms;
14 if ( isset( $wgGrammarForms['hsb'][$case][$word] ) ) {
15 return $wgGrammarForms['hsb'][$case][$word];
19 case 'instrumental': # instrumental
22 case 'lokatiw': # lokatiw
23 $word = 'wo ' . $word;
27 return $word; # this will return the original value for 'nominatiw' (nominativ) and all undefined case values
30 function convertPlural( $count, $forms ) {
31 if ( !count($forms) ) { return ''; }
32 $forms = $this->preConvertPlural( $forms, 4 );
34 switch ( abs( $count ) % 100 ) {
35 case 1: return $forms[0]; // singular
36 case 2: return $forms[1]; // dual
38 case 4: return $forms[2]; // plural
39 default: return $forms[3]; // pluralgen