Merge "Special:Upload should not crash on failing previews"
[mediawiki.git] / languages / classes / LanguageTg.php
blobebc0d6ceaf87b5b2603ea8a89919b27cedd702f5
1 <?php
2 /**
3 * Tajik (Тоҷикӣ) specific code.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * http://www.gnu.org/copyleft/gpl.html
20 * @file
21 * @ingroup Language
24 /**
25 * Converts Tajiki to latin orthography
27 * @ingroup Language
29 class TgConverter extends LanguageConverter {
30 private $table = [
31 'а' => 'a',
32 'б' => 'b',
33 'в' => 'v',
34 'г' => 'g',
35 'д' => 'd',
36 'е' => 'e',
37 'ё' => 'jo',
38 'ж' => 'ƶ',
39 'з' => 'z',
40 'ии ' => 'iji ',
41 'и' => 'i',
42 'й' => 'j',
43 'к' => 'k',
44 'л' => 'l',
45 'м' => 'm',
46 'н' => 'n',
47 'о' => 'o',
48 'п' => 'p',
49 'р' => 'r',
50 'с' => 's',
51 'т' => 't',
52 'у' => 'u',
53 'ф' => 'f',
54 'х' => 'x',
55 'ч' => 'c',
56 'ш' => 'ş',
57 'ъ' => '\'',
58 'э' => 'e',
59 'ю' => 'ju',
60 'я' => 'ja',
61 'ғ' => 'ƣ',
62 'ӣ' => 'ī',
63 'қ' => 'q',
64 'ӯ' => 'ū',
65 'ҳ' => 'h',
66 'ҷ' => 'ç',
67 'ц' => 'ts',
68 'А' => 'A',
69 'Б' => 'B',
70 'В' => 'V',
71 'Г' => 'G',
72 'Д' => 'D',
73 'Е' => 'E',
74 'Ё' => 'Jo',
75 'Ж' => 'Ƶ',
76 'З' => 'Z',
77 'И' => 'I',
78 'Й' => 'J',
79 'К' => 'K',
80 'Л' => 'L',
81 'М' => 'M',
82 'Н' => 'N',
83 'О' => 'O',
84 'П' => 'P',
85 'Р' => 'R',
86 'С' => 'S',
87 'Т' => 'T',
88 'У' => 'U',
89 'Ф' => 'F',
90 'Х' => 'X',
91 'Ч' => 'C',
92 'Ш' => 'Ş',
93 'Ъ' => '\'',
94 'Э' => 'E',
95 'Ю' => 'Ju',
96 'Я' => 'Ja',
97 'Ғ' => 'Ƣ',
98 'Ӣ' => 'Ī',
99 'Қ' => 'Q',
100 'Ӯ' => 'Ū',
101 'Ҳ' => 'H',
102 'Ҷ' => 'Ç',
103 'Ц' => 'Ts',
106 function loadDefaultTables() {
107 $this->mTables = [
108 'tg-latn' => new ReplacementArray( $this->table ),
109 'tg' => new ReplacementArray()
116 * Tajik (Тоҷикӣ)
118 * @ingroup Language
120 class LanguageTg extends Language {
121 function __construct() {
122 parent::__construct();
123 $variants = [ 'tg', 'tg-latn' ];
124 $this->mConverter = new TgConverter( $this, 'tg', $variants );