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