00001 <?php
00002
00007 class LanguageDsb extends Language {
00008
00009 # Convert from the nominative form of a noun to some other case
00010 # Invoked with {{GRAMMAR:case|word}}
00011
00012 function convertGrammar( $word, $case ) {
00013 global $wgGrammarForms;
00014 if ( isset( $wgGrammarForms['dsb'][$case][$word] ) ) {
00015 return $wgGrammarForms['dsb'][$case][$word];
00016 }
00017
00018 switch ( $case ) {
00019 case 'instrumental': # instrumental
00020 $word = 'z ' . $word;
00021 case 'lokatiw': # lokatiw
00022 $word = 'wo ' . $word;
00023 break;
00024 }
00025
00026 return $word; # this will return the original value for 'nominatiw' (nominativ) and all undefined case values
00027 }
00028
00029 function convertPlural( $count, $forms ) {
00030 if ( !count($forms) ) { return ''; }
00031 $forms = $this->preConvertPlural( $forms, 4 );
00032
00033 switch ( abs( $count ) % 100 ) {
00034 case 1: return $forms[0];
00035 case 2: return $forms[1];
00036 case 3:
00037 case 4: return $forms[2];
00038 default: return $forms[3];
00039 }
00040 }
00041 }