MediaWiki master
LanguageHsb.php
Go to the documentation of this file.
1<?php
24
30class LanguageHsb extends Language {
31
32 public function convertGrammar( $word, $case ) {
33 $grammarForms =
34 MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::GrammarForms );
35 if ( isset( $grammarForms['hsb'][$case][$word] ) ) {
36 return $grammarForms['hsb'][$case][$word];
37 }
38
39 switch ( $case ) {
40 case 'instrumental': # instrumental
41 $word = 'z ' . $word;
42 break;
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}
Upper Sorbian (Hornjoserbsce)
convertGrammar( $word, $case)
Grammatical transformations, needed for inflected languages Invoked by putting {{grammar:case|word}} ...
Base class for language-specific code.
Definition Language.php:81
A class containing constants representing the names of configuration variables.
Service locator for MediaWiki core services.