2 /** Upper Sorbian (Hornjoserbsce)
7 class LanguageHsb
extends Language
{
10 * Convert from the nominative form of a noun to some other case
11 * Invoked with {{grammar:case|word}}
17 function convertGrammar( $word, $case ) {
18 global $wgGrammarForms;
19 if ( isset( $wgGrammarForms['hsb'][$case][$word] ) ) {
20 return $wgGrammarForms['hsb'][$case][$word];
24 case 'instrumental': # instrumental
27 case 'lokatiw': # lokatiw
28 $word = 'wo ' . $word;
32 return $word; # this will return the original value for 'nominatiw' (nominativ) and all undefined case values
40 function convertPlural( $count, $forms ) {
41 if ( !count( $forms ) ) { return ''; }
42 $forms = $this->preConvertPlural( $forms, 4 );
44 switch ( abs( $count ) %
100 ) {
45 case 1: return $forms[0]; // singular
46 case 2: return $forms[1]; // dual
48 case 4: return $forms[2]; // plural
49 default: return $forms[3]; // pluralgen