MediaWiki  1.34.0
LanguageDsb.php
Go to the documentation of this file.
1 <?php
30 class LanguageDsb extends Language {
39  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  case 'lokatiw': # lokatiw
49  $word = 'wo ' . $word;
50  break;
51  }
52 
53  # this will return the original value for 'nominatiw' (nominativ) and
54  # all undefined case values.
55  return $word;
56  }
57 }
LanguageDsb\convertGrammar
convertGrammar( $word, $case)
Convert from the nominative form of a noun to some other case Invoked with {{grammar:case|word}}.
Definition: LanguageDsb.php:39
$wgGrammarForms
$wgGrammarForms
Some languages need different word forms, usually for different cases.
Definition: DefaultSettings.php:2965
Language
Internationalisation code.
Definition: Language.php:37
LanguageDsb
Lower Sorbian (Dolnoserbski)
Definition: LanguageDsb.php:30