61 # Ending for allative case
63 # Variable for 'j' beetwen vowels
65 # Variable for "-" for not Ossetic words
70 # CHecking if the $word is in plural form
71 if ( preg_match(
'/тæ$/u', $word ) ) {
72 $word = mb_substr( $word, 0, -1 );
74 } elseif ( preg_match(
"/[аæеёиоыэюя]$/u", $word ) ) {
75 # Works if $word is in singular form.
76 # Checking if $word ends on one of the vowels: е, ё, и, о, ы, э, ю, я.
78 } elseif ( preg_match(
"/у$/u", $word ) ) {
79 # Checking if $word ends on 'у'. 'У'
80 # can be either consonant 'W' or vowel 'U' in cyrillic Ossetic.
81 # Examples: {{grammar:genitive|аунеу}} = аунеуы, {{grammar:genitive|лæппу}} = лæппуйы.
82 if ( !preg_match(
"/[аæеёиоыэюя]$/u", mb_substr( $word, -2, 1 ) ) ) {
85 } elseif ( !preg_match(
"/[бвгджзйклмнопрстфхцчшщьъ]$/u", $word ) ) {
91 $ending = $hyphen . $jot .
'ы';
94 $ending = $hyphen . $jot .
'æн';
97 $ending = $hyphen . $end_allative;
101 $ending = $hyphen . $jot .
'æ';
103 $ending = $hyphen . $jot .
'æй';
109 $ending = $hyphen . $jot .
'ыл';
112 $ending = $hyphen . $jot .
'ау';
115 $ending = $hyphen .
'имæ';
118 return $word . $ending;