32 MediaWikiServices::getInstance()->getMainConfig()->get( MainConfigNames::GrammarForms );
34 if ( isset( $grammarForms[
'сu'][$case][$word] ) ) {
35 return $grammarForms[
'сu'][$case][$word];
38 # These rules are not perfect, but they are currently only used for
39 # site names, so it doesn't matter if they are wrong sometimes.
40 # Just add a special case for your site name if necessary.
42 # join and array_slice instead mb_substr
44 preg_match_all(
'/./us', $word, $ar );
45 if ( !preg_match(
"/[a-zA-Z_]/u", $word ) ) {
47 case 'genitive': # родительный падеж
53 if ( implode(
'', array_slice( $ar[0], -2 ) ) ==
'ї' ) {
54 return implode(
'', array_slice( $ar[0], 0, -2 ) ) .
'їѩ';
57 case 'accusative': # винительный падеж
Old Church Slavonic (Ѩзыкъ словѣньскъ)
convertGrammar( $word, $case)
Grammatical transformations, needed for inflected languages Invoked by putting {{grammar:case|word}} ...
Base class for language-specific code.
A class containing constants representing the names of configuration variables.