MediaWiki REL1_37
LanguageDsb.php
Go to the documentation of this file.
1<?php
30class LanguageDsb extends Language {
39 public function convertGrammar( $word, $case ) {
40 global $wgGrammarForms;
41 if ( isset( $wgGrammarForms['dsb'][$case][$word] ) ) {
42 return $wgGrammarForms['dsb'][$case][$word];
43 }
44
45 switch ( $case ) {
46 case 'instrumental': # instrumental
47 $word = 'z ' . $word;
48 // fall-through
49 case 'lokatiw': # lokatiw
50 $word = 'wo ' . $word;
51 break;
52 }
53
54 # this will return the original value for 'nominatiw' (nominativ) and
55 # all undefined case values.
56 return $word;
57 }
58}
$wgGrammarForms
Some languages need different word forms, usually for different cases.
Lower Sorbian (Dolnoserbski)
convertGrammar( $word, $case)
Convert from the nominative form of a noun to some other case Invoked with {{grammar:case|word}}.
Internationalisation code See https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation for more...
Definition Language.php:42