MediaWiki  REL1_19
LanguageHsb.php
Go to the documentation of this file.
00001 <?php
00007 class LanguageHsb extends Language {
00008 
00017         function convertGrammar( $word, $case ) {
00018                 global $wgGrammarForms;
00019                 if ( isset( $wgGrammarForms['hsb'][$case][$word] ) ) {
00020                         return $wgGrammarForms['hsb'][$case][$word];
00021                 }
00022 
00023                 switch ( $case ) {
00024                         case 'instrumental': # instrumental
00025                                 $word = 'z ' . $word;
00026                                 break;
00027                         case 'lokatiw': # lokatiw
00028                                 $word = 'wo ' . $word;
00029                                 break;
00030                         }
00031 
00032                 return $word; # this will return the original value for 'nominatiw' (nominativ) and all undefined case values
00033         }
00034 
00040         function convertPlural( $count, $forms ) {
00041                 if ( !count( $forms ) ) { return ''; }
00042                 $forms = $this->preConvertPlural( $forms, 4 );
00043 
00044                 switch ( abs( $count ) % 100 ) {
00045                         case 1:  return $forms[0]; // singular
00046                         case 2:  return $forms[1]; // dual
00047                         case 3:
00048                         case 4:  return $forms[2]; // plural
00049                         default: return $forms[3]; // pluralgen
00050                 }
00051         }
00052 }