00001 <?php
00007 class LanguageHsb 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['hsb'][$case][$word] ) ) {
00015 return $wgGrammarForms['hsb'][$case][$word];
00016 }
00017
00018 switch ( $case ) {
00019 case 'instrumental': # instrumental
00020 $word = 'z ' . $word;
00021 break;
00022 case 'lokatiw': # lokatiw
00023 $word = 'wo ' . $word;
00024 break;
00025 }
00026
00027 return $word; # this will return the original value for 'nominatiw' (nominativ) and all undefined case values
00028 }
00029
00030 function convertPlural( $count, $forms ) {
00031 if ( !count($forms) ) { return ''; }
00032 $forms = $this->preConvertPlural( $forms, 4 );
00033
00034 switch ( abs( $count ) % 100 ) {
00035 case 1: return $forms[0];
00036 case 2: return $forms[1];
00037 case 3:
00038 case 4: return $forms[2];
00039 default: return $forms[3];
00040 }
00041 }
00042 }