MediaWiki
master
LanguageSl.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
LanguageSl
extends
Language
{
31
37
public
function
convertGrammar
( $word, $case ) {
38
$grammarForms =
39
MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::GrammarForms );
40
if
( isset( $grammarForms[
'sl'
][$case][$word] ) ) {
41
return
$grammarForms[
'sl'
][$case][$word];
42
}
43
44
switch
( $case ) {
45
case
'mestnik'
: # locative
46
$word =
'o '
. $word;
47
break
;
48
49
case
'orodnik'
: # instrumental
50
$word =
'z '
. $word;
51
break
;
52
}
53
54
# this will return the original value for 'imenovalnik' (nominativ) and
55
# all undefined case values.
56
return
$word;
57
}
58
}
LanguageSl
Slovenian (Slovenščina)
Definition
LanguageSl.php:30
LanguageSl\convertGrammar
convertGrammar( $word, $case)
Cases: rodilnik, dajalnik, tožilnik, mestnik, orodnik.
Definition
LanguageSl.php:37
MediaWiki\Language\Language
Base class for language-specific code.
Definition
Language.php:81
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
LanguageSl.php
Generated on Sat Dec 21 2024 11:24:24 for MediaWiki by
1.10.0