MediaWiki REL1_31
LanguageHsb.php
Go to the documentation of this file.
1<?php
29class LanguageHsb extends Language {
38 function convertGrammar( $word, $case ) {
39 global $wgGrammarForms;
40 if ( isset( $wgGrammarForms['hsb'][$case][$word] ) ) {
41 return $wgGrammarForms['hsb'][$case][$word];
42 }
43
44 switch ( $case ) {
45 case 'instrumental': # instrumental
46 $word = 'z ' . $word;
47 break;
48 case 'lokatiw': # lokatiw
49 $word = 'wo ' . $word;
50 break;
51 }
52
53 # this will return the original value for 'nominatiw' (nominativ) and
54 # all undefined case values.
55 return $word;
56 }
57}
$wgGrammarForms
Some languages need different word forms, usually for different cases.
Upper Sorbian (Hornjoserbsce)
convertGrammar( $word, $case)
Convert from the nominative form of a noun to some other case Invoked with {{grammar:case|word}}.
Internationalisation code.
Definition Language.php:35