MediaWiki
master
LanguageBs.php
Go to the documentation of this file.
1
<?php
21
use
MediaWiki\MainConfigNames
;
22
use
MediaWiki\MediaWikiServices
;
23
29
class
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
}
LanguageBs
Bosnian (bosanski)
Definition
LanguageBs.php:29
LanguageBs\convertGrammar
convertGrammar( $word, $case)
Cases: genitiv, dativ, akuzativ, vokativ, instrumental, lokativ.
Definition
LanguageBs.php:35
MediaWiki\MainConfigNames
A class containing constants representing the names of configuration variables.
Definition
MainConfigNames.php:22
MediaWiki\MediaWikiServices
Service locator for MediaWiki core services.
Definition
MediaWikiServices.php:240
includes
languages
LanguageBs.php
Generated on Sun Sep 15 2024 02:23:21 for MediaWiki by
1.10.0