MediaWiki  master
LanguageDsb.php
Go to the documentation of this file.
1 <?php
24 
30 class LanguageDsb extends Language {
31  public function convertGrammar( $word, $case ) {
32  $grammarForms =
33  MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::GrammarForms );
34  if ( isset( $grammarForms['dsb'][$case][$word] ) ) {
35  return $grammarForms['dsb'][$case][$word];
36  }
37 
38  switch ( $case ) {
39  case 'instrumental': # instrumental
40  $word = 'z ' . $word;
41  // fall-through
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 }
Lower Sorbian (Dolnoserbski) specific code.
Definition: LanguageDsb.php:30
convertGrammar( $word, $case)
Grammatical transformations, needed for inflected languages Invoked by putting {{grammar:case|word}} ...
Definition: LanguageDsb.php:31
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.