MediaWiki  1.30.0
LanguageTg.php
Go to the documentation of this file.
1 <?php
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',
104  ];
105 
106  function loadDefaultTables() {
107  $this->mTables = [
108  'tg-latn' => new ReplacementArray( $this->table ),
109  'tg' => new ReplacementArray()
110  ];
111  }
112 
113 }
114 
120 class LanguageTg extends Language {
121  function __construct() {
122  parent::__construct();
123  $variants = [ 'tg', 'tg-latn' ];
124  $this->mConverter = new TgConverter( $this, 'tg', $variants );
125  }
126 }
TgConverter\$table
$table
Definition: LanguageTg.php:30
php
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition: injection.txt:35
TgConverter\loadDefaultTables
loadDefaultTables()
Definition: LanguageTg.php:106
LanguageTg\__construct
__construct()
Definition: LanguageTg.php:121
table
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global then executing the whole list after the page is displayed We don t do anything smart like collating updates to the same table or such because the list is almost always going to have just one item on if so it s not worth the trouble Since there is a job queue in the jobs table
Definition: deferred.txt:11
LanguageTg
Tajik (Тоҷикӣ)
Definition: LanguageTg.php:120
ReplacementArray
Wrapper around strtr() that holds replacements.
Definition: ReplacementArray.php:24
TgConverter
Converts Tajiki to latin orthography.
Definition: LanguageTg.php:29
Language
Internationalisation code.
Definition: Language.php:35