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