Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4061773
LanguageSh.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
LanguageSh.php
View Options
<?php
/**
* @license GPL-2.0-or-later
* @file
*/
use
MediaWiki\Language\Language
;
use
MediaWiki\MainConfigNames
;
use
MediaWiki\MediaWikiServices
;
/**
* Serbo-Croatian (srpskohrvatski / српскохрватски)
*
* @ingroup Languages
*/
class
LanguageSh
extends
Language
{
/**
* Cases: genitiv, dativ, akuzativ, vokativ, instrumental, lokativ
*
* @inheritDoc
*/
public
function
convertGrammar
(
$word
,
$case
)
{
$grammarForms
=
MediaWikiServices
::
getInstance
()->
getMainConfig
()->
get
(
MainConfigNames
::
GrammarForms
);
if
(
!
isset
(
$grammarForms
[
'sh'
]
)
)
{
return
$word
;
}
if
(
isset
(
$grammarForms
[
'sh'
][
$case
][
$word
]
)
)
{
return
$grammarForms
[
'sh'
][
$case
][
$word
];
}
# if the word is not supported (i.e. there's no entry for any case),
# use a descriptive declension for it
$isWordSupported
=
false
;
foreach
(
$grammarForms
[
'sh'
]
as
$caseForms
)
{
if
(
isset
(
$caseForms
[
$word
]
)
)
{
$isWordSupported
=
true
;
break
;
}
}
# descriptive declension for unknown projects
if
(
!
$isWordSupported
&&
isset
(
$grammarForms
[
'sh'
][
$case
][
'projekt'
]
)
)
{
return
$grammarForms
[
'sh'
][
$case
][
'projekt'
]
.
' '
.
$word
;
}
# this will return the original value for 'nominativ' (nominative)
return
$word
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 16 2026, 09:37 (12 w, 12 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
7e/3e/d0d18c5ce574c221c45a6cd987a3
Default Alt Text
LanguageSh.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment