MediaWiki master
LanguageBs.php
Go to the documentation of this file.
1<?php
10
16class LanguageBs extends Language {
22 public function convertGrammar( $word, $case ) {
23 $grammarForms =
24 MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::GrammarForms );
25 if ( isset( $grammarForms['bs'][$case][$word] ) ) {
26 return $grammarForms['bs'][$case][$word];
27 }
28 switch ( $case ) {
29 case 'instrumental': # instrumental
30 $word = 's ' . $word;
31 break;
32 case 'lokativ': # locative
33 $word = 'o ' . $word;
34 break;
35 }
36
37 # this will return the original value for 'nominativ' (nominative)
38 # and all undefined case values.
39 return $word;
40 }
41}
Bosnian (bosanski)
convertGrammar( $word, $case)
Cases: genitiv, dativ, akuzativ, vokativ, instrumental, lokativ.
Base class for language-specific code.
Definition Language.php:70
A class containing constants representing the names of configuration variables.
Service locator for MediaWiki core services.