MediaWiki master
LanguageBs.php
Go to the documentation of this file.
1<?php
7namespace MediaWiki\Languages;
8
12
18class LanguageBs extends Language {
24 public function convertGrammar( $word, $case ) {
25 $grammarForms =
27 if ( isset( $grammarForms['bs'][$case][$word] ) ) {
28 return $grammarForms['bs'][$case][$word];
29 }
30 switch ( $case ) {
31 case 'instrumental': # instrumental
32 $word = 's ' . $word;
33 break;
34 case 'lokativ': # locative
35 $word = 'o ' . $word;
36 break;
37 }
38
39 # this will return the original value for 'nominativ' (nominative)
40 # and all undefined case values.
41 return $word;
42 }
43}
44
46class_alias( LanguageBs::class, 'LanguageBs' );
Base class for language-specific code.
Definition Language.php:65
convertGrammar( $word, $case)
Cases: genitiv, dativ, akuzativ, vokativ, instrumental, lokativ.
A class containing constants representing the names of configuration variables.
const GrammarForms
Name constant for the GrammarForms setting, for use with Config::get()
Service locator for MediaWiki core services.
static getInstance()
Returns the global default instance of the top level service locator.