Linux anchor 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
Apache/2.4.18 (Ubuntu)
Server IP : 10.10.100.4 & Your IP : 216.73.217.150
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
wiki.bernardino.org /
languages /
classes /
Delete
Unzip
Name
Size
Permission
Date
Action
LanguageAm.php
404
B
-rw-r--r--
2011-05-29 17:03
LanguageAr.php
1.45
KB
-rw-r--r--
2016-11-28 20:20
LanguageAz.php
1.14
KB
-rw-r--r--
2016-11-28 20:20
LanguageBe.php
1.17
KB
-rw-r--r--
2011-05-29 17:20
LanguageBe_tarask.php
2.39
KB
-rw-r--r--
2016-11-28 20:20
LanguageBg.php
1.3
KB
-rw-r--r--
2016-11-28 20:20
LanguageBh.php
412
B
-rw-r--r--
2011-05-29 17:53
LanguageBs.php
1.63
KB
-rw-r--r--
2016-11-28 20:20
LanguageCs.php
690
B
-rw-r--r--
2011-05-29 17:20
LanguageCu.php
2.16
KB
-rw-r--r--
2016-11-28 20:20
LanguageCy.php
683
B
-rw-r--r--
2011-05-29 17:20
LanguageDsb.php
1.59
KB
-rw-r--r--
2016-11-28 20:20
LanguageEo.php
3.8
KB
-rw-r--r--
2011-06-17 18:05
LanguageEs.php
1.17
KB
-rw-r--r--
2016-11-28 20:20
LanguageEt.php
1.21
KB
-rw-r--r--
2016-11-28 20:20
LanguageFi.php
4.57
KB
-rw-r--r--
2016-11-28 20:20
LanguageFr.php
413
B
-rw-r--r--
2011-05-29 17:03
LanguageGa.php
1.73
KB
-rw-r--r--
2016-11-28 20:20
LanguageGan.php
2.76
KB
-rw-r--r--
2016-11-28 20:20
LanguageGd.php
1
KB
-rw-r--r--
2011-05-29 17:03
LanguageGv.php
544
B
-rw-r--r--
2011-05-29 17:20
LanguageHe.php
1.9
KB
-rw-r--r--
2016-11-28 20:20
LanguageHi.php
408
B
-rw-r--r--
2011-05-29 17:53
LanguageHr.php
755
B
-rw-r--r--
2011-05-29 17:20
LanguageHsb.php
1.58
KB
-rw-r--r--
2016-11-28 20:20
LanguageHu.php
1.36
KB
-rw-r--r--
2016-11-28 20:20
LanguageHy.php
2.77
KB
-rw-r--r--
2016-11-28 20:20
LanguageIu.deps.php
394
B
-rw-r--r--
2011-04-21 23:21
LanguageIu.php
8.02
KB
-rw-r--r--
2016-11-28 20:20
LanguageJa.php
1.83
KB
-rw-r--r--
2016-11-28 20:20
LanguageKaa.php
2.34
KB
-rw-r--r--
2016-11-28 20:20
LanguageKk.deps.php
461
B
-rw-r--r--
2010-07-29 11:43
LanguageKk.php
14.99
KB
-rw-r--r--
2016-11-28 20:20
LanguageKk_cyrl.php
26.6
KB
-rw-r--r--
2016-11-28 20:20
LanguageKm.php
1.2
KB
-rw-r--r--
2016-11-28 20:20
LanguageKsh.php
6.53
KB
-rw-r--r--
2016-11-28 20:20
LanguageKu.deps.php
459
B
-rw-r--r--
2010-07-29 11:43
LanguageKu.php
6.59
KB
-rw-r--r--
2016-11-28 20:20
LanguageKu_ku.php
1.3
KB
-rw-r--r--
2016-11-28 20:20
LanguageLa.php
3.41
KB
-rw-r--r--
2016-11-28 20:20
LanguageLn.php
492
B
-rw-r--r--
2011-05-29 17:53
LanguageLt.php
802
B
-rw-r--r--
2011-05-29 17:20
LanguageLv.php
997
B
-rw-r--r--
2011-05-18 00:03
LanguageMg.php
401
B
-rw-r--r--
2011-05-29 17:03
LanguageMk.php
556
B
-rw-r--r--
2011-05-29 17:53
LanguageMl.php
1.63
KB
-rw-r--r--
2016-11-28 20:20
LanguageMo.php
604
B
-rw-r--r--
2011-05-29 17:20
LanguageMt.php
564
B
-rw-r--r--
2011-05-29 17:20
LanguageMy.php
1.18
KB
-rw-r--r--
2016-11-28 20:20
LanguageNso.php
416
B
-rw-r--r--
2011-05-29 17:03
LanguageOs.php
3.67
KB
-rw-r--r--
2016-11-28 20:20
LanguagePl.php
1.16
KB
-rw-r--r--
2016-11-28 20:20
LanguageQqx.php
1.28
KB
-rw-r--r--
2016-11-28 20:20
LanguageRo.php
587
B
-rw-r--r--
2011-05-29 17:21
LanguageRu.php
2.35
KB
-rw-r--r--
2016-11-28 20:20
LanguageSe.php
569
B
-rw-r--r--
2011-05-29 17:21
LanguageSgs.php
641
B
-rw-r--r--
2011-06-11 00:33
LanguageSh.php
948
B
-rw-r--r--
2011-05-29 17:21
LanguageShi.php
5.32
KB
-rw-r--r--
2016-11-28 20:20
LanguageSk.php
481
B
-rw-r--r--
2011-05-29 17:21
LanguageSl.php
1.62
KB
-rw-r--r--
2016-11-28 20:20
LanguageSma.php
574
B
-rw-r--r--
2011-07-16 13:40
LanguageSr.deps.php
459
B
-rw-r--r--
2010-07-29 11:43
LanguageSr.php
6.76
KB
-rw-r--r--
2016-11-28 20:20
LanguageSr_ec.php
571
B
-rw-r--r--
2011-05-29 17:21
LanguageSr_el.deps.php
394
B
-rw-r--r--
2010-07-29 11:43
LanguageSr_el.php
568
B
-rw-r--r--
2011-05-29 17:21
LanguageTg.php
2.46
KB
-rw-r--r--
2016-11-28 20:20
LanguageTi.php
405
B
-rw-r--r--
2011-05-29 17:59
LanguageTl.php
399
B
-rw-r--r--
2011-05-29 17:59
LanguageTr.php
1.62
KB
-rw-r--r--
2016-11-28 20:20
LanguageTyv.php
8.76
KB
-rw-r--r--
2016-11-28 20:20
LanguageUk.php
2.75
KB
-rw-r--r--
2016-11-28 20:20
LanguageUz.php
4.17
KB
-rw-r--r--
2016-11-28 20:20
LanguageWa.php
3.04
KB
-rw-r--r--
2016-11-28 20:20
LanguageYue.php
1.58
KB
-rw-r--r--
2016-11-28 20:20
LanguageZh.deps.php
461
B
-rw-r--r--
2010-07-29 11:43
LanguageZh.php
5.74
KB
-rw-r--r--
2016-11-28 20:20
LanguageZh_hans.php
2.64
KB
-rw-r--r--
2016-11-28 20:20
Save
Rename
<?php /** * Kazakh (Қазақша) specific code. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * http://www.gnu.org/copyleft/gpl.html * * @file * @ingroup Language */ /** * Kazakh (Қазақша) * * @ingroup Language */ // @codingStandardsIgnoreStart Ignore class name is not in camel caps format error class LanguageKk_cyrl extends Language { // @codingStandardsIgnoreEnd # Convert from the nominative form of a noun to some other case # Invoked with {{GRAMMAR:case|word}} /** * Cases: genitive, dative, accusative, locative, ablative, comitative + possessive forms * * @param string $word * @param string $case * * @return string */ function convertGrammarKk_cyrl( $word, $case ) { global $wgGrammarForms; if ( isset( $wgGrammarForms['kk-kz'][$case][$word] ) ) { return $wgGrammarForms['kk-kz'][$case][$word]; } if ( isset( $wgGrammarForms['kk-cyrl'][$case][$word] ) ) { return $wgGrammarForms['kk-cyrl'][$case][$word]; } // Set up some constants... // Vowels in last syllable $frontVowels = [ "е", "ө", "ү", "і", "ә", "э", "я", "ё", "и" ]; $backVowels = [ "а", "о", "ұ", "ы" ]; $allVowels = [ "е", "ө", "ү", "і", "ә", "э", "а", "о", "ұ", "ы", "я", "ё", "и" ]; // Preceding letters $Nasals = [ "м", "н", "ң" ]; $Sonants = [ "и", "й", "л", "р", "у", "ю" ]; $Consonants = [ "п", "ф", "к", "қ", "т", "ш", "с", "х", "ц", "ч", "щ", "б", "в", "г", "д" ]; $Sibilants = [ "ж", "з" ]; $Sonorants = [ "и", "й", "л", "р", "у", "ю", "м", "н", "ң", "ж", "з" ]; // Possessives $firstPerson = [ "м", "ң" ]; // 1st singular, 2nd unformal $secondPerson = [ "з" ]; // 1st plural, 2nd formal $thirdPerson = [ "ы", "і" ]; // 3rd $lastLetter = $this->lastLetter( $word, $allVowels ); $wordEnding =& $lastLetter[0]; $wordLastVowel =& $lastLetter[1]; // Now convert the word switch ( $case ) { case "dc1": case "genitive": # ilik if ( in_array( $wordEnding, $Consonants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "тің"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "тың"; } } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Nasals ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "нің"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "ның"; } } elseif ( in_array( $wordEnding, $Sonants ) || in_array( $wordEnding, $Sibilants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "дің"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "дың"; } } break; case "dc2": case "dative": # barıs if ( in_array( $wordEnding, $Consonants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "ке"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "қа"; } } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Sonorants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "ге"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "ға"; } } break; case "dc21": case "possessive dative": # täweldık + barıs if ( in_array( $wordEnding, $firstPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "е"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "а"; } } elseif ( in_array( $wordEnding, $secondPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "ге"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "ға"; } } elseif ( in_array( $wordEnding, $thirdPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "не"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "на"; } } break; case "dc3": case "accusative": # tabıs if ( in_array( $wordEnding, $Consonants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "ті"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "ты"; } } elseif ( in_array( $wordEnding, $allVowels ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "ні"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "ны"; } } elseif ( in_array( $wordEnding, $Sonorants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "ді"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "ды"; } } break; case "dc31": case "possessive accusative": # täweldık + tabıs if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "ді"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "ды"; } } elseif ( in_array( $wordEnding, $thirdPerson ) ) { $word = $word . "н"; } break; case "dc4": case "locative": # jatıs if ( in_array( $wordEnding, $Consonants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "те"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "та"; } } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Sonorants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "де"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "да"; } } break; case "dc41": case "possessive locative": # täweldık + jatıs if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "де"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "да"; } } elseif ( in_array( $wordEnding, $thirdPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "нде"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "нда"; } } break; case "dc5": case "ablative": # şığıs if ( in_array( $wordEnding, $Consonants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "тен"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "тан"; } } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Sonants ) || in_array( $wordEnding, $Sibilants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "ден"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "дан"; } } elseif ( in_array( $wordEnding, $Nasals ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "нен"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "нан"; } } break; case "dc51": case "possessive ablative": # täweldık + şığıs if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $thirdPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "нен"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "нан"; } } elseif ( in_array( $wordEnding, $secondPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "ден"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "дан"; } } break; case "dc6": case "comitative": # kömektes if ( in_array( $wordEnding, $Consonants ) ) { $word = $word . "пен"; } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Nasals ) || in_array( $wordEnding, $Sonants ) ) { $word = $word . "мен"; } elseif ( in_array( $wordEnding, $Sibilants ) ) { $word = $word . "бен"; } break; case "dc61": case "possessive comitative": # täweldık + kömektes if ( in_array( $wordEnding, $Consonants ) ) { $word = $word . "пенен"; } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Nasals ) || in_array( $wordEnding, $Sonants ) ) { $word = $word . "менен"; } elseif ( in_array( $wordEnding, $Sibilants ) ) { $word = $word . "бенен"; } break; default: # dc0 #nominative #ataw } return $word; } /** * @param string $word * @param string $case * @return string */ function convertGrammarKk_latn( $word, $case ) { global $wgGrammarForms; if ( isset( $wgGrammarForms['kk-tr'][$case][$word] ) ) { return $wgGrammarForms['kk-tr'][$case][$word]; } if ( isset( $wgGrammarForms['kk-latn'][$case][$word] ) ) { return $wgGrammarForms['kk-latn'][$case][$word]; } // Set up some constants... // Vowels in last syllable $frontVowels = [ "e", "ö", "ü", "i", "ä", "é" ]; $backVowels = [ "a", "o", "u", "ı" ]; $allVowels = [ "e", "ö", "ü", "i", "ä", "é", "a", "o", "u", "ı" ]; // Preceding letters $Nasals = [ "m", "n", "ñ" ]; $Sonants = [ "ï", "y", "ý", "l", "r", "w" ]; $Consonants = [ "p", "f", "k", "q", "t", "ş", "s", "x", "c", "ç", "b", "v", "g", "d" ]; $Sibilants = [ "j", "z" ]; $Sonorants = [ "ï", "y", "ý", "l", "r", "w", "m", "n", "ñ", "j", "z" ]; // Possessives $firstPerson = [ "m", "ñ" ]; // 1st singular, 2nd unformal $secondPerson = [ "z" ]; // 1st plural, 2nd formal $thirdPerson = [ "ı", "i" ]; // 3rd $lastLetter = $this->lastLetter( $word, $allVowels ); $wordEnding =& $lastLetter[0]; $wordLastVowel =& $lastLetter[1]; // Now convert the word switch ( $case ) { case "dc1": case "genitive": # ilik if ( in_array( $wordEnding, $Consonants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "tiñ"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "tıñ"; } } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Nasals ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "niñ"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "nıñ"; } } elseif ( in_array( $wordEnding, $Sonants ) || in_array( $wordEnding, $Sibilants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "diñ"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "dıñ"; } } break; case "dc2": case "dative": # barıs if ( in_array( $wordEnding, $Consonants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "ke"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "qa"; } } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Sonorants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "ge"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "ğa"; } } break; case "dc21": case "possessive dative": # täweldık + barıs if ( in_array( $wordEnding, $firstPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "e"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "a"; } } elseif ( in_array( $wordEnding, $secondPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "ge"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "ğa"; } } elseif ( in_array( $wordEnding, $thirdPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "ne"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "na"; } } break; case "dc3": case "accusative": # tabıs if ( in_array( $wordEnding, $Consonants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "ti"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "tı"; } } elseif ( in_array( $wordEnding, $allVowels ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "ni"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "nı"; } } elseif ( in_array( $wordEnding, $Sonorants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "di"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "dı"; } } break; case "dc31": case "possessive accusative": # täweldık + tabıs if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "di"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "dı"; } } elseif ( in_array( $wordEnding, $thirdPerson ) ) { $word = $word . "n"; } break; case "dc4": case "locative": # jatıs if ( in_array( $wordEnding, $Consonants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "te"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "ta"; } } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Sonorants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "de"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "da"; } } break; case "dc41": case "possessive locative": # täweldık + jatıs if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "de"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "da"; } } elseif ( in_array( $wordEnding, $thirdPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "nde"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "nda"; } } break; case "dc5": case "ablative": # şığıs if ( in_array( $wordEnding, $Consonants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "ten"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "tan"; } } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Sonants ) || in_array( $wordEnding, $Sibilants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "den"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "dan"; } } elseif ( in_array( $wordEnding, $Nasals ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "nen"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "nan"; } } break; case "dc51": case "possessive ablative": # täweldık + şığıs if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $thirdPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "nen"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "nan"; } } elseif ( in_array( $wordEnding, $secondPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "den"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "dan"; } } break; case "dc6": case "comitative": # kömektes if ( in_array( $wordEnding, $Consonants ) ) { $word = $word . "pen"; } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Nasals ) || in_array( $wordEnding, $Sonants ) ) { $word = $word . "men"; } elseif ( in_array( $wordEnding, $Sibilants ) ) { $word = $word . "ben"; } break; case "dc61": case "possessive comitative": # täweldık + kömektes if ( in_array( $wordEnding, $Consonants ) ) { $word = $word . "penen"; } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Nasals ) || in_array( $wordEnding, $Sonants ) ) { $word = $word . "menen"; } elseif ( in_array( $wordEnding, $Sibilants ) ) { $word = $word . "benen"; } break; default: # dc0 #nominative #ataw } return $word; } /** * @param string $word * @param string $case * @return string */ function convertGrammarKk_arab( $word, $case ) { global $wgGrammarForms; if ( isset( $wgGrammarForms['kk-cn'][$case][$word] ) ) { return $wgGrammarForms['kk-cn'][$case][$word]; } if ( isset( $wgGrammarForms['kk-arab'][$case][$word] ) ) { return $wgGrammarForms['kk-arab'][$case][$word]; } // Set up some constants... // Vowels in last syllable $frontVowels = [ "ە", "ٶ", "ٷ", "ٸ", "ٵ", "ە" ]; $backVowels = [ "ا", "و", "ۇ", "ى" ]; $allVowels = [ "ە", "ٶ", "ٷ", "ٸ", "ٵ", "ە", "ا", "و", "ۇ", "ى" ]; // Preceding letters $Nasals = [ "م", "ن", "ڭ" ]; $Sonants = [ "ي", "ي", "ل", "ر", "ۋ" ]; $Consonants = [ "پ", "ف", "ك", "ق", "ت", "ش", "س", "ح", "تس", "چ", "ب", "ۆ", "گ", "د" ]; $Sibilants = [ "ج", "ز" ]; $Sonorants = [ "ي", "ي", "ل", "ر", "ۋ", "م", "ن", "ڭ", "ج", "ز" ]; // Possessives $firstPerson = [ "م", "ڭ" ]; // 1st singular, 2nd unformal $secondPerson = [ "ز" ]; // 1st plural, 2nd formal $thirdPerson = [ "ى", "ٸ" ]; // 3rd $lastLetter = $this->lastLetter( $word, $allVowels ); $wordEnding = $lastLetter[0]; $wordLastVowel = $lastLetter[1]; // Now convert the word switch ( $case ) { case "dc1": case "genitive": # ilik if ( in_array( $wordEnding, $Consonants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "تٸڭ"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "تىڭ"; } } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Nasals ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "نٸڭ"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "نىڭ"; } } elseif ( in_array( $wordEnding, $Sonants ) || in_array( $wordEnding, $Sibilants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "دٸڭ"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "دىڭ"; } } break; case "dc2": case "dative": # barıs if ( in_array( $wordEnding, $Consonants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "كە"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "قا"; } } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Sonorants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "گە"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "عا"; } } break; case "dc21": case "possessive dative": # täweldık + barıs if ( in_array( $wordEnding, $firstPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "ە"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "ا"; } } elseif ( in_array( $wordEnding, $secondPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "گە"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "عا"; } } elseif ( in_array( $wordEnding, $thirdPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "نە"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "نا"; } } break; case "dc3": case "accusative": # tabıs if ( in_array( $wordEnding, $Consonants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "تٸ"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "تى"; } } elseif ( in_array( $wordEnding, $allVowels ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "نٸ"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "نى"; } } elseif ( in_array( $wordEnding, $Sonorants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "دٸ"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "دى"; } } break; case "dc31": case "possessive accusative": # täweldık + tabıs if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "دٸ"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "دى"; } } elseif ( in_array( $wordEnding, $thirdPerson ) ) { $word = $word . "ن"; } break; case "dc4": case "locative": # jatıs if ( in_array( $wordEnding, $Consonants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "تە"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "تا"; } } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Sonorants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "دە"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "دا"; } } break; case "dc41": case "possessive locative": # täweldık + jatıs if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $secondPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "دە"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "دا"; } } elseif ( in_array( $wordEnding, $thirdPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "ندە"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "ندا"; } } break; case "dc5": case "ablative": # şığıs if ( in_array( $wordEnding, $Consonants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "تەن"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "تان"; } } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Sonants ) || in_array( $wordEnding, $Sibilants ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "دەن"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "دان"; } } elseif ( in_array( $wordEnding, $Nasals ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "نەن"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "نان"; } } break; case "dc51": case "possessive ablative": # täweldık + şığıs if ( in_array( $wordEnding, $firstPerson ) || in_array( $wordEnding, $thirdPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "نەن"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "نان"; } } elseif ( in_array( $wordEnding, $secondPerson ) ) { if ( in_array( $wordLastVowel, $frontVowels ) ) { $word = $word . "دەن"; } elseif ( in_array( $wordLastVowel, $backVowels ) ) { $word = $word . "دان"; } } break; case "dc6": case "comitative": # kömektes if ( in_array( $wordEnding, $Consonants ) ) { $word = $word . "پەن"; } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Nasals ) || in_array( $wordEnding, $Sonants ) ) { $word = $word . "مەن"; } elseif ( in_array( $wordEnding, $Sibilants ) ) { $word = $word . "بەن"; } break; case "dc61": case "possessive comitative": # täweldık + kömektes if ( in_array( $wordEnding, $Consonants ) ) { $word = $word . "پەنەن"; } elseif ( in_array( $wordEnding, $allVowels ) || in_array( $wordEnding, $Nasals ) || in_array( $wordEnding, $Sonants ) ) { $word = $word . "مەنەن"; } elseif ( in_array( $wordEnding, $Sibilants ) ) { $word = $word . "بەنەن"; } break; default: # dc0 #nominative #ataw } return $word; } /** * @param string $word * @param array $allVowels * @return array */ function lastLetter( $word, $allVowels ) { $lastLetter = []; // Put the word in a form we can play with since we're using UTF-8 $ar = preg_split( '//u', parent::lc( $word ), -1, PREG_SPLIT_NO_EMPTY ); // Here's an array with the order of the letters in the word reversed // so we can find a match quicker *shrug* $wordReversed = array_reverse( $ar ); // Here's the last letter in the word $lastLetter[0] = $ar[count( $ar ) - 1]; // Find the last vowel in the word $lastLetter[1] = null; foreach ( $wordReversed as $xvalue ) { foreach ( $allVowels as $yvalue ) { if ( strcmp( $xvalue, $yvalue ) == 0 ) { $lastLetter[1] = $xvalue; break; } else { continue; } } if ( $lastLetter[1] !== null ) { break; } else { continue; } } return $lastLetter; } /** * Avoid grouping whole numbers between 0 to 9999 * * @param string $_ * * @return string */ function commafy( $_ ) { if ( !preg_match( '/^\d{1,4}$/', $_ ) ) { return strrev( (string)preg_replace( '/(\d{3})(?=\d)(?!\d*\.)/', '$1,', strrev( $_ ) ) ); } else { return $_; } } }