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