MediaWiki master
LanguageHsb.php
Go to the documentation of this file.
1<?php
23
29class LanguageHsb extends Language {
30
31 public function convertGrammar( $word, $case ) {
32 $grammarForms =
33 MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::GrammarForms );
34 if ( isset( $grammarForms['hsb'][$case][$word] ) ) {
35 return $grammarForms['hsb'][$case][$word];
36 }
37
38 switch ( $case ) {
39 case 'instrumental': # instrumental
40 $word = 'z ' . $word;
41 break;
42 case 'lokatiw': # lokatiw
43 $word = 'wo ' . $word;
44 break;
45 }
46
47 # this will return the original value for 'nominatiw' (nominativ) and
48 # all undefined case values.
49 return $word;
50 }
51}
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:63
A class containing constants representing the names of configuration variables.
Service locator for MediaWiki core services.