MediaWiki  master
LanguageBs.php
Go to the documentation of this file.
1 <?php
23 
29 class LanguageBs extends Language {
41  public function convertGrammar( $word, $case ) {
42  $grammarForms =
43  MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::GrammarForms );
44  if ( isset( $grammarForms['bs'][$case][$word] ) ) {
45  return $grammarForms['bs'][$case][$word];
46  }
47  switch ( $case ) {
48  case 'instrumental': # instrumental
49  $word = 's ' . $word;
50  break;
51  case 'lokativ': # locative
52  $word = 'o ' . $word;
53  break;
54  }
55 
56  # this will return the original value for 'nominativ' (nominative)
57  # and all undefined case values.
58  return $word;
59  }
60 }
Bosnian (bosanski)
Definition: LanguageBs.php:29
convertGrammar( $word, $case)
Convert from the nominative form of a noun to some other case Invoked with {{GRAMMAR:case|word}}.
Definition: LanguageBs.php:41
Base class for language-specific code.
Definition: Language.php:54
A class containing constants representing the names of configuration variables.
Service locator for MediaWiki core services.