41 if ( isset( $wgGrammarForms[
'сu'][$case][$word] ) ) {
42 return $wgGrammarForms[
'сu'][$case][$word];
45 # These rules are not perfect, but they are currently only used for site names so it doesn't
46 # matter if they are wrong sometimes. Just add a special case for your site name if necessary.
48 # join and array_slice instead mb_substr
50 preg_match_all(
'/./us', $word, $ar );
51 if ( !preg_match(
"/[a-zA-Z_]/us", $word ) ) {
53 case 'genitive': # родительный падеж
54 if ( ( join(
'', array_slice( $ar[0], -4 ) ) ==
'вики' ) || ( join(
'', array_slice( $ar[0], -4 ) ) ==
'Вики' ) ) {
55 } elseif ( join(
'', array_slice( $ar[0], -2 ) ) ==
'ї' ) {
56 $word = join(
'', array_slice( $ar[0], 0, -2 ) ) .
'їѩ';
59 case 'accusative': # винительный падеж