31 # Convert from the nominative form of a noun to some other case
32 # Invoked with {{GRAMMAR:case|word}}
51 $frontVowels = [
"е",
"ө",
"ү",
"і",
"ә",
"э",
"я",
"ё",
"и" ];
52 $backVowels = [
"а",
"о",
"ұ",
"ы" ];
53 $allVowels = [
"е",
"ө",
"ү",
"і",
"ә",
"э",
"а",
"о",
"ұ",
"ы",
"я",
"ё",
"и" ];
55 $Nasals = [
"м",
"н",
"ң" ];
56 $Sonants = [
"и",
"й",
"л",
"р",
"у",
"ю" ];
57 $Consonants = [
"п",
"ф",
"к",
"қ",
"т",
"ш",
"с",
"х",
"ц",
"ч",
"щ",
"б",
"в",
"г",
"д" ];
58 $Sibilants = [
"ж",
"з" ];
59 $Sonorants = [
"и",
"й",
"л",
"р",
"у",
"ю",
"м",
"н",
"ң",
"ж",
"з" ];
62 $firstPerson = [
"м",
"ң" ];
63 $secondPerson = [
"з" ];
64 $thirdPerson = [
"ы",
"і" ];
66 $lastLetter = $this->
lastLetter( $word, $allVowels );
67 $wordEnding =& $lastLetter[0];
68 $wordLastVowel =& $lastLetter[1];
73 case "genitive": # ilik
74 if ( in_array( $wordEnding, $Consonants ) ) {
75 if ( in_array( $wordLastVowel, $frontVowels ) ) {
76 $word = $word .
"тің";
77 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
78 $word = $word .
"тың";
80 } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Nasals ) ) {
81 if ( in_array( $wordLastVowel, $frontVowels ) ) {
82 $word = $word .
"нің";
83 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
84 $word = $word .
"ның";
86 } elseif ( in_array( $wordEnding, $Sonants ) || in_array( $wordEnding, $Sibilants ) ) {
87 if ( in_array( $wordLastVowel, $frontVowels ) ) {
88 $word = $word .
"дің";
89 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
90 $word = $word .
"дың";
95 case "dative": # barıs
96 if ( in_array( $wordEnding, $Consonants ) ) {
97 if ( in_array( $wordLastVowel, $frontVowels ) ) {
99 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
100 $word = $word .
"қа";
102 } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Sonorants ) ) {
103 if ( in_array( $wordLastVowel, $frontVowels ) ) {
104 $word = $word .
"ге";
105 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
106 $word = $word .
"ға";
111 case "possessive dative": # täweldık + barıs
112 if ( in_array( $wordEnding, $firstPerson ) ) {
113 if ( in_array( $wordLastVowel, $frontVowels ) ) {
115 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
118 } elseif ( in_array( $wordEnding, $secondPerson ) ) {
119 if ( in_array( $wordLastVowel, $frontVowels ) ) {
120 $word = $word .
"ге";
121 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
122 $word = $word .
"ға";
124 } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
125 if ( in_array( $wordLastVowel, $frontVowels ) ) {
126 $word = $word .
"не";
127 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
128 $word = $word .
"на";
133 case "accusative": # tabıs
134 if ( in_array( $wordEnding, $Consonants ) ) {
135 if ( in_array( $wordLastVowel, $frontVowels ) ) {
136 $word = $word .
"ті";
137 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
138 $word = $word .
"ты";
140 } elseif ( in_array( $wordEnding, $allVowels ) ) {
141 if ( in_array( $wordLastVowel, $frontVowels ) ) {
142 $word = $word .
"ні";
143 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
144 $word = $word .
"ны";
146 } elseif ( in_array( $wordEnding, $Sonorants ) ) {
147 if ( in_array( $wordLastVowel, $frontVowels ) ) {
148 $word = $word .
"ді";
149 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
150 $word = $word .
"ды";
155 case "possessive accusative": # täweldık + tabıs
156 if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) {
157 if ( in_array( $wordLastVowel, $frontVowels ) ) {
158 $word = $word .
"ді";
159 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
160 $word = $word .
"ды";
162 } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
167 case "locative": # jatıs
168 if ( in_array( $wordEnding, $Consonants ) ) {
169 if ( in_array( $wordLastVowel, $frontVowels ) ) {
170 $word = $word .
"те";
171 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
172 $word = $word .
"та";
174 } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Sonorants ) ) {
175 if ( in_array( $wordLastVowel, $frontVowels ) ) {
176 $word = $word .
"де";
177 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
178 $word = $word .
"да";
183 case "possessive locative": # täweldık + jatıs
184 if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) {
185 if ( in_array( $wordLastVowel, $frontVowels ) ) {
186 $word = $word .
"де";
187 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
188 $word = $word .
"да";
190 } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
191 if ( in_array( $wordLastVowel, $frontVowels ) ) {
192 $word = $word .
"нде";
193 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
194 $word = $word .
"нда";
199 case "ablative": # şığıs
200 if ( in_array( $wordEnding, $Consonants ) ) {
201 if ( in_array( $wordLastVowel, $frontVowels ) ) {
202 $word = $word .
"тен";
203 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
204 $word = $word .
"тан";
206 } elseif ( in_array( $wordEnding, $allVowels )
207 || in_array( $wordEnding, $Sonants )
208 || in_array( $wordEnding, $Sibilants )
210 if ( in_array( $wordLastVowel, $frontVowels ) ) {
211 $word = $word .
"ден";
212 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
213 $word = $word .
"дан";
215 } elseif ( in_array( $wordEnding, $Nasals ) ) {
216 if ( in_array( $wordLastVowel, $frontVowels ) ) {
217 $word = $word .
"нен";
218 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
219 $word = $word .
"нан";
224 case "possessive ablative": # täweldık + şığıs
225 if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $thirdPerson ) ) {
226 if ( in_array( $wordLastVowel, $frontVowels ) ) {
227 $word = $word .
"нен";
228 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
229 $word = $word .
"нан";
231 } elseif ( in_array( $wordEnding, $secondPerson ) ) {
232 if ( in_array( $wordLastVowel, $frontVowels ) ) {
233 $word = $word .
"ден";
234 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
235 $word = $word .
"дан";
240 case "comitative": # kömektes
241 if ( in_array( $wordEnding, $Consonants ) ) {
242 $word = $word .
"пен";
243 } elseif ( in_array( $wordEnding, $allVowels )
244 || in_array( $wordEnding, $Nasals )
245 || in_array( $wordEnding, $Sonants )
247 $word = $word .
"мен";
248 } elseif ( in_array( $wordEnding, $Sibilants ) ) {
249 $word = $word .
"бен";
253 case "possessive comitative": # täweldık + kömektes
254 if ( in_array( $wordEnding, $Consonants ) ) {
255 $word = $word .
"пенен";
256 } elseif ( in_array( $wordEnding, $allVowels )
257 || in_array( $wordEnding, $Nasals )
258 || in_array( $wordEnding, $Sonants )
260 $word = $word .
"менен";
261 } elseif ( in_array( $wordEnding, $Sibilants ) ) {
262 $word = $word .
"бенен";
265 default: # dc0 #nominative #ataw
285 $frontVowels = [
"e",
"ö",
"ü",
"i",
"ä",
"é" ];
286 $backVowels = [
"a",
"o",
"u",
"ı" ];
287 $allVowels = [
"e",
"ö",
"ü",
"i",
"ä",
"é",
"a",
"o",
"u",
"ı" ];
289 $Nasals = [
"m",
"n",
"ñ" ];
290 $Sonants = [
"ï",
"y",
"ý",
"l",
"r",
"w" ];
291 $Consonants = [
"p",
"f",
"k",
"q",
"t",
"ş",
"s",
"x",
"c",
"ç",
"b",
"v",
"g",
"d" ];
292 $Sibilants = [
"j",
"z" ];
293 $Sonorants = [
"ï",
"y",
"ý",
"l",
"r",
"w",
"m",
"n",
"ñ",
"j",
"z" ];
296 $firstPerson = [
"m",
"ñ" ];
297 $secondPerson = [
"z" ];
298 $thirdPerson = [
"ı",
"i" ];
300 $lastLetter = $this->
lastLetter( $word, $allVowels );
301 $wordEnding =& $lastLetter[0];
302 $wordLastVowel =& $lastLetter[1];
307 case "genitive": # ilik
308 if ( in_array( $wordEnding, $Consonants ) ) {
309 if ( in_array( $wordLastVowel, $frontVowels ) ) {
310 $word = $word .
"tiñ";
311 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
312 $word = $word .
"tıñ";
314 } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Nasals ) ) {
315 if ( in_array( $wordLastVowel, $frontVowels ) ) {
316 $word = $word .
"niñ";
317 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
318 $word = $word .
"nıñ";
320 } elseif ( in_array( $wordEnding, $Sonants ) || in_array( $wordEnding, $Sibilants ) ) {
321 if ( in_array( $wordLastVowel, $frontVowels ) ) {
322 $word = $word .
"diñ";
323 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
324 $word = $word .
"dıñ";
329 case "dative": # barıs
330 if ( in_array( $wordEnding, $Consonants ) ) {
331 if ( in_array( $wordLastVowel, $frontVowels ) ) {
332 $word = $word .
"ke";
333 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
334 $word = $word .
"qa";
336 } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Sonorants ) ) {
337 if ( in_array( $wordLastVowel, $frontVowels ) ) {
338 $word = $word .
"ge";
339 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
340 $word = $word .
"ğa";
345 case "possessive dative": # täweldık + barıs
346 if ( in_array( $wordEnding, $firstPerson ) ) {
347 if ( in_array( $wordLastVowel, $frontVowels ) ) {
349 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
352 } elseif ( in_array( $wordEnding, $secondPerson ) ) {
353 if ( in_array( $wordLastVowel, $frontVowels ) ) {
354 $word = $word .
"ge";
355 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
356 $word = $word .
"ğa";
358 } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
359 if ( in_array( $wordLastVowel, $frontVowels ) ) {
360 $word = $word .
"ne";
361 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
362 $word = $word .
"na";
367 case "accusative": # tabıs
368 if ( in_array( $wordEnding, $Consonants ) ) {
369 if ( in_array( $wordLastVowel, $frontVowels ) ) {
370 $word = $word .
"ti";
371 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
372 $word = $word .
"tı";
374 } elseif ( in_array( $wordEnding, $allVowels ) ) {
375 if ( in_array( $wordLastVowel, $frontVowels ) ) {
376 $word = $word .
"ni";
377 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
378 $word = $word .
"nı";
380 } elseif ( in_array( $wordEnding, $Sonorants ) ) {
381 if ( in_array( $wordLastVowel, $frontVowels ) ) {
382 $word = $word .
"di";
383 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
384 $word = $word .
"dı";
389 case "possessive accusative": # täweldık + tabıs
390 if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) {
391 if ( in_array( $wordLastVowel, $frontVowels ) ) {
392 $word = $word .
"di";
393 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
394 $word = $word .
"dı";
396 } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
401 case "locative": # jatıs
402 if ( in_array( $wordEnding, $Consonants ) ) {
403 if ( in_array( $wordLastVowel, $frontVowels ) ) {
404 $word = $word .
"te";
405 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
406 $word = $word .
"ta";
408 } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Sonorants ) ) {
409 if ( in_array( $wordLastVowel, $frontVowels ) ) {
410 $word = $word .
"de";
411 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
412 $word = $word .
"da";
417 case "possessive locative": # täweldık + jatıs
418 if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) {
419 if ( in_array( $wordLastVowel, $frontVowels ) ) {
420 $word = $word .
"de";
421 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
422 $word = $word .
"da";
424 } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
425 if ( in_array( $wordLastVowel, $frontVowels ) ) {
426 $word = $word .
"nde";
427 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
428 $word = $word .
"nda";
433 case "ablative": # şığıs
434 if ( in_array( $wordEnding, $Consonants ) ) {
435 if ( in_array( $wordLastVowel, $frontVowels ) ) {
436 $word = $word .
"ten";
437 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
438 $word = $word .
"tan";
440 } elseif ( in_array( $wordEnding, $allVowels )
441 || in_array( $wordEnding, $Sonants )
442 || in_array( $wordEnding, $Sibilants )
444 if ( in_array( $wordLastVowel, $frontVowels ) ) {
445 $word = $word .
"den";
446 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
447 $word = $word .
"dan";
449 } elseif ( in_array( $wordEnding, $Nasals ) ) {
450 if ( in_array( $wordLastVowel, $frontVowels ) ) {
451 $word = $word .
"nen";
452 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
453 $word = $word .
"nan";
458 case "possessive ablative": # täweldık + şığıs
459 if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $thirdPerson ) ) {
460 if ( in_array( $wordLastVowel, $frontVowels ) ) {
461 $word = $word .
"nen";
462 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
463 $word = $word .
"nan";
465 } elseif ( in_array( $wordEnding, $secondPerson ) ) {
466 if ( in_array( $wordLastVowel, $frontVowels ) ) {
467 $word = $word .
"den";
468 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
469 $word = $word .
"dan";
474 case "comitative": # kömektes
475 if ( in_array( $wordEnding, $Consonants ) ) {
476 $word = $word .
"pen";
477 } elseif ( in_array( $wordEnding, $allVowels )
478 || in_array( $wordEnding, $Nasals )
479 || in_array( $wordEnding, $Sonants )
481 $word = $word .
"men";
482 } elseif ( in_array( $wordEnding, $Sibilants ) ) {
483 $word = $word .
"ben";
487 case "possessive comitative": # täweldık + kömektes
488 if ( in_array( $wordEnding, $Consonants ) ) {
489 $word = $word .
"penen";
490 } elseif ( in_array( $wordEnding, $allVowels )
491 || in_array( $wordEnding, $Nasals )
492 || in_array( $wordEnding, $Sonants )
494 $word = $word .
"menen";
495 } elseif ( in_array( $wordEnding, $Sibilants ) ) {
496 $word = $word .
"benen";
499 default: # dc0 #nominative #ataw
519 $frontVowels = [
"ە",
"ٶ",
"ٷ",
"ٸ",
"ٵ",
"ە" ];
520 $backVowels = [
"ا",
"و",
"ۇ",
"ى" ];
521 $allVowels = [
"ە",
"ٶ",
"ٷ",
"ٸ",
"ٵ",
"ە",
"ا",
"و",
"ۇ",
"ى" ];
523 $Nasals = [
"م",
"ن",
"ڭ" ];
524 $Sonants = [
"ي",
"ي",
"ل",
"ر",
"ۋ" ];
525 $Consonants = [
"پ",
"ف",
"ك",
"ق",
"ت",
"ش",
"س",
"ح",
"تس",
"چ",
"ب",
"ۆ",
"گ",
"د" ];
526 $Sibilants = [
"ج",
"ز" ];
527 $Sonorants = [
"ي",
"ي",
"ل",
"ر",
"ۋ",
"م",
"ن",
"ڭ",
"ج",
"ز" ];
530 $firstPerson = [
"م",
"ڭ" ];
531 $secondPerson = [
"ز" ];
532 $thirdPerson = [
"ى",
"ٸ" ];
534 $lastLetter = $this->
lastLetter( $word, $allVowels );
535 $wordEnding = $lastLetter[0];
536 $wordLastVowel = $lastLetter[1];
541 case "genitive": # ilik
542 if ( in_array( $wordEnding, $Consonants ) ) {
543 if ( in_array( $wordLastVowel, $frontVowels ) ) {
544 $word = $word .
"تٸڭ";
545 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
546 $word = $word .
"تىڭ";
548 } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Nasals ) ) {
549 if ( in_array( $wordLastVowel, $frontVowels ) ) {
550 $word = $word .
"نٸڭ";
551 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
552 $word = $word .
"نىڭ";
554 } elseif ( in_array( $wordEnding, $Sonants ) || in_array( $wordEnding, $Sibilants ) ) {
555 if ( in_array( $wordLastVowel, $frontVowels ) ) {
556 $word = $word .
"دٸڭ";
557 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
558 $word = $word .
"دىڭ";
563 case "dative": # barıs
564 if ( in_array( $wordEnding, $Consonants ) ) {
565 if ( in_array( $wordLastVowel, $frontVowels ) ) {
566 $word = $word .
"كە";
567 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
568 $word = $word .
"قا";
570 } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Sonorants ) ) {
571 if ( in_array( $wordLastVowel, $frontVowels ) ) {
572 $word = $word .
"گە";
573 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
574 $word = $word .
"عا";
579 case "possessive dative": # täweldık + barıs
580 if ( in_array( $wordEnding, $firstPerson ) ) {
581 if ( in_array( $wordLastVowel, $frontVowels ) ) {
583 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
586 } elseif ( in_array( $wordEnding, $secondPerson ) ) {
587 if ( in_array( $wordLastVowel, $frontVowels ) ) {
588 $word = $word .
"گە";
589 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
590 $word = $word .
"عا";
592 } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
593 if ( in_array( $wordLastVowel, $frontVowels ) ) {
594 $word = $word .
"نە";
595 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
596 $word = $word .
"نا";
601 case "accusative": # tabıs
602 if ( in_array( $wordEnding, $Consonants ) ) {
603 if ( in_array( $wordLastVowel, $frontVowels ) ) {
604 $word = $word .
"تٸ";
605 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
606 $word = $word .
"تى";
608 } elseif ( in_array( $wordEnding, $allVowels ) ) {
609 if ( in_array( $wordLastVowel, $frontVowels ) ) {
610 $word = $word .
"نٸ";
611 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
612 $word = $word .
"نى";
614 } elseif ( in_array( $wordEnding, $Sonorants ) ) {
615 if ( in_array( $wordLastVowel, $frontVowels ) ) {
616 $word = $word .
"دٸ";
617 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
618 $word = $word .
"دى";
623 case "possessive accusative": # täweldık + tabıs
624 if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) {
625 if ( in_array( $wordLastVowel, $frontVowels ) ) {
626 $word = $word .
"دٸ";
627 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
628 $word = $word .
"دى";
630 } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
635 case "locative": # jatıs
636 if ( in_array( $wordEnding, $Consonants ) ) {
637 if ( in_array( $wordLastVowel, $frontVowels ) ) {
638 $word = $word .
"تە";
639 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
640 $word = $word .
"تا";
642 } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Sonorants ) ) {
643 if ( in_array( $wordLastVowel, $frontVowels ) ) {
644 $word = $word .
"دە";
645 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
646 $word = $word .
"دا";
651 case "possessive locative": # täweldık + jatıs
652 if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) {
653 if ( in_array( $wordLastVowel, $frontVowels ) ) {
654 $word = $word .
"دە";
655 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
656 $word = $word .
"دا";
658 } elseif ( in_array( $wordEnding, $thirdPerson ) ) {
659 if ( in_array( $wordLastVowel, $frontVowels ) ) {
660 $word = $word .
"ندە";
661 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
662 $word = $word .
"ندا";
667 case "ablative": # şığıs
668 if ( in_array( $wordEnding, $Consonants ) ) {
669 if ( in_array( $wordLastVowel, $frontVowels ) ) {
670 $word = $word .
"تەن";
671 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
672 $word = $word .
"تان";
674 } elseif ( in_array( $wordEnding, $allVowels )
675 || in_array( $wordEnding, $Sonants )
676 || in_array( $wordEnding, $Sibilants )
678 if ( in_array( $wordLastVowel, $frontVowels ) ) {
679 $word = $word .
"دەن";
680 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
681 $word = $word .
"دان";
683 } elseif ( in_array( $wordEnding, $Nasals ) ) {
684 if ( in_array( $wordLastVowel, $frontVowels ) ) {
685 $word = $word .
"نەن";
686 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
687 $word = $word .
"نان";
692 case "possessive ablative": # täweldık + şığıs
693 if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $thirdPerson ) ) {
694 if ( in_array( $wordLastVowel, $frontVowels ) ) {
695 $word = $word .
"نەن";
696 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
697 $word = $word .
"نان";
699 } elseif ( in_array( $wordEnding, $secondPerson ) ) {
700 if ( in_array( $wordLastVowel, $frontVowels ) ) {
701 $word = $word .
"دەن";
702 } elseif ( in_array( $wordLastVowel, $backVowels ) ) {
703 $word = $word .
"دان";
708 case "comitative": # kömektes
709 if ( in_array( $wordEnding, $Consonants ) ) {
710 $word = $word .
"پەن";
711 } elseif ( in_array( $wordEnding, $allVowels )
712 || in_array( $wordEnding, $Nasals )
713 || in_array( $wordEnding, $Sonants )
715 $word = $word .
"مەن";
716 } elseif ( in_array( $wordEnding, $Sibilants ) ) {
717 $word = $word .
"بەن";
721 case "possessive comitative": # täweldık + kömektes
722 if ( in_array( $wordEnding, $Consonants ) ) {
723 $word = $word .
"پەنەن";
724 } elseif ( in_array( $wordEnding, $allVowels )
725 || in_array( $wordEnding, $Nasals )
726 || in_array( $wordEnding, $Sonants )
728 $word = $word .
"مەنەن";
729 } elseif ( in_array( $wordEnding, $Sibilants ) ) {
730 $word = $word .
"بەنەن";
733 default: # dc0 #nominative #ataw
747 $ar = preg_split(
'//u', parent::lc( $word ), -1, PREG_SPLIT_NO_EMPTY );
751 $wordReversed = array_reverse( $ar );
754 $lastLetter[0] = $ar[
count( $ar ) - 1];
757 $lastLetter[1] =
null;
758 foreach ( $wordReversed
as $xvalue ) {
759 foreach ( $allVowels
as $yvalue ) {
760 if ( strcmp( $xvalue, $yvalue ) == 0 ) {
761 $lastLetter[1] = $xvalue;
767 if ( $lastLetter[1] !==
null ) {