MediaWiki master
LanguageBs.php
Go to the documentation of this file.
1<?php
24
30class LanguageBs extends Language {
36 public function convertGrammar( $word, $case ) {
37 $grammarForms =
38 MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::GrammarForms );
39 if ( isset( $grammarForms['bs'][$case][$word] ) ) {
40 return $grammarForms['bs'][$case][$word];
41 }
42 switch ( $case ) {
43 case 'instrumental': # instrumental
44 $word = 's ' . $word;
45 break;
46 case 'lokativ': # locative
47 $word = 'o ' . $word;
48 break;
49 }
50
51 # this will return the original value for 'nominativ' (nominative)
52 # and all undefined case values.
53 return $word;
54 }
55}
Bosnian (bosanski)
convertGrammar( $word, $case)
Cases: genitiv, dativ, akuzativ, vokativ, instrumental, lokativ.
Base class for language-specific code.
Definition Language.php:80
A class containing constants representing the names of configuration variables.
Service locator for MediaWiki core services.