MediaWiki master
LanguageDsb.php
Go to the documentation of this file.
1<?php
25
31class LanguageDsb extends Language {
32 public function convertGrammar( $word, $case ) {
33 $grammarForms =
34 MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::GrammarForms );
35 if ( isset( $grammarForms['dsb'][$case][$word] ) ) {
36 return $grammarForms['dsb'][$case][$word];
37 }
38
39 switch ( $case ) {
40 case 'instrumental': # instrumental
41 $word = 'z ' . $word;
42 // fall-through
43 case 'lokatiw': # lokatiw
44 $word = 'wo ' . $word;
45 break;
46 }
47
48 # this will return the original value for 'nominatiw' (nominativ) and
49 # all undefined case values.
50 return $word;
51 }
52}
Lower Sorbian (Dolnoserbski) specific code.
convertGrammar( $word, $case)
Grammatical transformations, needed for inflected languages Invoked by putting {{grammar:case|word}} ...
Base class for language-specific code.
Definition Language.php:80
A class containing constants representing the names of configuration variables.
Service locator for MediaWiki core services.