MediaWiki 1.42.1
LanguageBs.php
Go to the documentation of this file.
1<?php
23
29class LanguageBs extends Language {
35 public function convertGrammar( $word, $case ) {
36 $grammarForms =
37 MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::GrammarForms );
38 if ( isset( $grammarForms['bs'][$case][$word] ) ) {
39 return $grammarForms['bs'][$case][$word];
40 }
41 switch ( $case ) {
42 case 'instrumental': # instrumental
43 $word = 's ' . $word;
44 break;
45 case 'lokativ': # locative
46 $word = 'o ' . $word;
47 break;
48 }
49
50 # this will return the original value for 'nominativ' (nominative)
51 # and all undefined case values.
52 return $word;
53 }
54}
Bosnian (bosanski)
convertGrammar( $word, $case)
Cases: genitiv, dativ, akuzativ, vokativ, instrumental, lokativ.
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.