MediaWiki
master
LanguageBs.php
Go to the documentation of this file.
1
<?php
21
use
MediaWiki\Language\Language
;
22
use
MediaWiki\MainConfigNames
;
23
use
MediaWiki\MediaWikiServices
;
24
30
class
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
}
LanguageBs
Bosnian (bosanski)
Definition
LanguageBs.php:30
LanguageBs\convertGrammar
convertGrammar( $word, $case)
Cases: genitiv, dativ, akuzativ, vokativ, instrumental, lokativ.
Definition
LanguageBs.php:36
MediaWiki\Language\Language
Base class for language-specific code.
Definition
Language.php:80
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:242
includes
languages
LanguageBs.php
Generated on Thu Nov 21 2024 10:24:18 for MediaWiki by
1.10.0