[TASK] Further improvements for the site configuration
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Configuration / SiteConfiguration / site_language.php
1 <?php
2
3 return [
4 'ctrl' => [
5 'label' => 'languageId',
6 'label_userFunc' => \TYPO3\CMS\Backend\Configuration\TCA\UserFunctions::class . '->getSiteLanguageTitle',
7 'title' => 'LLL:EXT:backend/Resources/Private/Language/locallang_siteconfiguration_tca.xlf:site_language.ctrl.title',
8 'typeicon_classes' => [
9 'default' => 'mimetypes-x-content-domain',
10 ],
11 ],
12 'columns' => [
13 'languageId' => [
14 'label' => 'LLL:EXT:backend/Resources/Private/Language/locallang_siteconfiguration_tca.xlf:site_language.language',
15 'config' => [
16 'type' => 'select',
17 'renderType' => 'selectSingle',
18 'items' => [
19 ['Default Language', 0],
20 ],
21 'foreign_table' => 'sys_language',
22 'size' => 1,
23 'min' => 1,
24 'max' => 1,
25 ],
26 ],
27 'title' => [
28 'label' => 'LLL:EXT:backend/Resources/Private/Language/locallang_siteconfiguration_tca.xlf:site_language.title',
29 'config' => [
30 'type' => 'input',
31 'size' => 10,
32 'eval' => 'required, trim',
33 'placeholder' => 'English',
34 ],
35 ],
36 'navigationTitle' => [
37 'label' => 'LLL:EXT:backend/Resources/Private/Language/locallang_siteconfiguration_tca.xlf:site_language.navigationTitle',
38 'config' => [
39 'type' => 'input',
40 'size' => 10,
41 'eval' => 'trim',
42 'placeholder' => 'English',
43 ],
44 ],
45 'base' => [
46 'label' => 'LLL:EXT:backend/Resources/Private/Language/locallang_siteconfiguration_tca.xlf:site_language.base',
47 'description' => 'LLL:EXT:backend/Resources/Private/Language/siteconfiguration_fieldinformation.xlf:site_language.base',
48 'config' => [
49 'type' => 'input',
50 'eval' => 'required, trim',
51 'default' => '/',
52 'placeholder' => '/',
53 ],
54 ],
55 'locale' => [
56 'label' => 'LLL:EXT:backend/Resources/Private/Language/locallang_siteconfiguration_tca.xlf:site_language.locale',
57 'description' => 'LLL:EXT:backend/Resources/Private/Language/siteconfiguration_fieldinformation.xlf:site_language.locale',
58 'config' => [
59 'type' => 'input',
60 'eval' => 'required, trim',
61 'placeholder' => 'en_US.UTF-8',
62 ],
63 ],
64 'iso-639-1' => [
65 'label' => 'LLL:EXT:backend/Resources/Private/Language/locallang_siteconfiguration_tca.xlf:site_language.iso-639-1',
66 'config' => [
67 'type' => 'select',
68 'renderType' => 'selectSingle',
69 // Fed by data provider
70 'items' => [],
71 ],
72 ],
73 'hreflang' => [
74 'label' => 'LLL:EXT:backend/Resources/Private/Language/locallang_siteconfiguration_tca.xlf:site_language.hreflang',
75 'config' => [
76 'type' => 'input',
77 'eval' => 'trim',
78 'placeholder' => 'en-US',
79 ],
80 ],
81 'enabled' => [
82 'label' => 'LLL:EXT:backend/Resources/Private/Language/locallang_siteconfiguration_tca.xlf:site_language.enabled',
83 'config' => [
84 'type' => 'check',
85 'renderType' => 'checkboxToggle',
86 'default' => 1,
87 'items' => [
88 [
89 0 => '',
90 1 => ''
91 ]
92 ]
93 ],
94 ],
95 'direction' => [
96 'label' => 'LLL:EXT:backend/Resources/Private/Language/locallang_siteconfiguration_tca.xlf:site_language.direction',
97 'config' => [
98 'type' => 'select',
99 'renderType' => 'selectSingle',
100 'items' => [
101 ['None', '', ''],
102 ['Left to Right', 'ltr', ''],
103 ['Right to Left', 'rtl', ''],
104 ],
105 ],
106 ],
107 'typo3Language' => [
108 'label' => 'LLL:EXT:backend/Resources/Private/Language/locallang_siteconfiguration_tca.xlf:site_language.typo3Language',
109 'description' => 'LLL:EXT:backend/Resources/Private/Language/siteconfiguration_fieldinformation.xlf:site_language.typo3Language',
110 'config' => [
111 'type' => 'select',
112 'renderType' => 'selectSingle',
113 // Fed by data provider
114 'items' => [],
115 'default' => 'default'
116 ],
117 ],
118 'flag' => [
119 'label' => 'LLL:EXT:backend/Resources/Private/Language/locallang_siteconfiguration_tca.xlf:site_language.flag',
120 'config' => [
121 'type' => 'select',
122 'renderType' => 'selectSingle',
123 'items' => [
124 ['global', 'global', 'flags-multiple'],
125 ['ad', 'ad', 'flags-ad'],
126 ['ae', 'ae', 'flags-ae'],
127 ['af', 'af', 'flags-af'],
128 ['ag', 'ag', 'flags-ag'],
129 ['ai', 'ai', 'flags-ai'],
130 ['al', 'al', 'flags-al'],
131 ['am', 'am', 'flags-am'],
132 ['an', 'an', 'flags-an'],
133 ['ao', 'ao', 'flags-ao'],
134 ['ar', 'ar', 'flags-ar'],
135 ['as', 'as', 'flags-as'],
136 ['at', 'at', 'flags-at'],
137 ['au', 'au', 'flags-au'],
138 ['aw', 'aw', 'flags-aw'],
139 ['ax', 'ax', 'flags-ax'],
140 ['az', 'az', 'flags-az'],
141 ['ba', 'ba', 'flags-ba'],
142 ['bb', 'bb', 'flags-bb'],
143 ['bd', 'bd', 'flags-bd'],
144 ['be', 'be', 'flags-be'],
145 ['bf', 'bf', 'flags-bf'],
146 ['bg', 'bg', 'flags-bg'],
147 ['bh', 'bh', 'flags-bh'],
148 ['bi', 'bi', 'flags-bi'],
149 ['bj', 'bj', 'flags-bj'],
150 ['bm', 'bm', 'flags-bm'],
151 ['bn', 'bn', 'flags-bn'],
152 ['bo', 'bo', 'flags-bo'],
153 ['br', 'br', 'flags-br'],
154 ['bs', 'bs', 'flags-bs'],
155 ['bt', 'bt', 'flags-bt'],
156 ['bv', 'bv', 'flags-bv'],
157 ['bw', 'bw', 'flags-bw'],
158 ['by', 'by', 'flags-by'],
159 ['bz', 'bz', 'flags-bz'],
160 ['ca', 'ca', 'flags-ca'],
161 ['catalonia', 'catalonia', 'flags-catalonia'],
162 ['cc', 'cc', 'flags-cc'],
163 ['cd', 'cd', 'flags-cd'],
164 ['cf', 'cf', 'flags-cf'],
165 ['cg', 'cg', 'flags-cg'],
166 ['ch', 'ch', 'flags-ch'],
167 ['ci', 'ci', 'flags-ci'],
168 ['ck', 'ck', 'flags-ck'],
169 ['cl', 'cl', 'flags-cl'],
170 ['cm', 'cm', 'flags-cm'],
171 ['cn', 'cn', 'flags-cn'],
172 ['co', 'co', 'flags-co'],
173 ['cr', 'cr', 'flags-cr'],
174 ['cs', 'cs', 'flags-cs'],
175 ['cu', 'cu', 'flags-cu'],
176 ['cv', 'cv', 'flags-cv'],
177 ['cx', 'cx', 'flags-cx'],
178 ['cy', 'cy', 'flags-cy'],
179 ['cz', 'cz', 'flags-cz'],
180 ['de', 'de', 'flags-de'],
181 ['dj', 'dj', 'flags-dj'],
182 ['dk', 'dk', 'flags-dk'],
183 ['dm', 'dm', 'flags-dm'],
184 ['do', 'do', 'flags-do'],
185 ['dz', 'dz', 'flags-dz'],
186 ['ec', 'ec', 'flags-ec'],
187 ['ee', 'ee', 'flags-ee'],
188 ['eg', 'eg', 'flags-eg'],
189 ['eh', 'eh', 'flags-eh'],
190 ['en-us-gb', 'en-us-gb', 'flags-en-us-gb'],
191 ['england', 'england', 'flags-gb-eng'],
192 ['er', 'er', 'flags-er'],
193 ['es', 'es', 'flags-es'],
194 ['et', 'et', 'flags-et'],
195 ['eu', 'eu', 'flags-eu'],
196 ['fm', 'fm', 'flags-fm'],
197 ['fi', 'fi', 'flags-fi'],
198 ['fj', 'fj', 'flags-fj'],
199 ['fk', 'fk', 'flags-fk'],
200 ['fm', 'fm', 'flags-fm'],
201 ['fo', 'fo', 'flags-fo'],
202 ['fr', 'fr', 'flags-fr'],
203 ['ga', 'ga', 'flags-ga'],
204 ['gb', 'gb', 'flags-gb'],
205 ['gd', 'gd', 'flags-gd'],
206 ['ge', 'ge', 'flags-ge'],
207 ['gf', 'gf', 'flags-gf'],
208 ['gh', 'gh', 'flags-gh'],
209 ['gi', 'gi', 'flags-gi'],
210 ['gl', 'gl', 'flags-gl'],
211 ['gm', 'gm', 'flags-gm'],
212 ['gn', 'gn', 'flags-gn'],
213 ['gp', 'gp', 'flags-gp'],
214 ['gq', 'gq', 'flags-gq'],
215 ['gr', 'gr', 'flags-gr'],
216 ['gs', 'gs', 'flags-gs'],
217 ['gt', 'gt', 'flags-gt'],
218 ['gu', 'gu', 'flags-gu'],
219 ['gw', 'gw', 'flags-gw'],
220 ['gy', 'gy', 'flags-gy'],
221 ['hk', 'hk', 'flags-hk'],
222 ['hm', 'hm', 'flags-hm'],
223 ['hn', 'hn', 'flags-hn'],
224 ['hr', 'hr', 'flags-hr'],
225 ['ht', 'ht', 'flags-ht'],
226 ['hu', 'hu', 'flags-hu'],
227 ['id', 'id', 'flags-id'],
228 ['ie', 'ie', 'flags-ie'],
229 ['il', 'il', 'flags-il'],
230 ['in', 'in', 'flags-in'],
231 ['io', 'io', 'flags-io'],
232 ['iq', 'iq', 'flags-iq'],
233 ['ir', 'ir', 'flags-ir'],
234 ['is', 'is', 'flags-is'],
235 ['it', 'it', 'flags-it'],
236 ['jm', 'jm', 'flags-jm'],
237 ['jo', 'jo', 'flags-jo'],
238 ['jp', 'jp', 'flags-jp'],
239 ['ke', 'ke', 'flags-ke'],
240 ['kg', 'kg', 'flags-kg'],
241 ['kh', 'kh', 'flags-kh'],
242 ['ki', 'ki', 'flags-ki'],
243 ['km', 'km', 'flags-km'],
244 ['kn', 'kn', 'flags-kn'],
245 ['kp', 'kp', 'flags-kp'],
246 ['kr', 'kr', 'flags-kr'],
247 ['kw', 'kw', 'flags-kw'],
248 ['ky', 'ky', 'flags-ky'],
249 ['kz', 'kz', 'flags-kz'],
250 ['la', 'la', 'flags-la'],
251 ['lb', 'lb', 'flags-lb'],
252 ['lc', 'lc', 'flags-lc'],
253 ['li', 'li', 'flags-li'],
254 ['lk', 'lk', 'flags-lk'],
255 ['lr', 'lr', 'flags-lr'],
256 ['ls', 'ls', 'flags-ls'],
257 ['lt', 'lt', 'flags-lt'],
258 ['lu', 'lu', 'flags-lu'],
259 ['lv', 'lv', 'flags-lv'],
260 ['ly', 'ly', 'flags-ly'],
261 ['ma', 'ma', 'flags-ma'],
262 ['mc', 'mc', 'flags-mc'],
263 ['md', 'md', 'flags-md'],
264 ['me', 'me', 'flags-me'],
265 ['mg', 'mg', 'flags-mg'],
266 ['mh', 'mh', 'flags-mh'],
267 ['mk', 'mk', 'flags-mk'],
268 ['ml', 'ml', 'flags-ml'],
269 ['mm', 'mm', 'flags-mm'],
270 ['mn', 'mn', 'flags-mn'],
271 ['mo', 'mo', 'flags-mo'],
272 ['mp', 'mp', 'flags-mp'],
273 ['mq', 'mq', 'flags-mq'],
274 ['mr', 'mr', 'flags-mr'],
275 ['ms', 'ms', 'flags-ms'],
276 ['mt', 'mt', 'flags-mt'],
277 ['mu', 'mu', 'flags-mu'],
278 ['mv', 'mv', 'flags-mv'],
279 ['mw', 'mw', 'flags-mw'],
280 ['mx', 'mx', 'flags-mx'],
281 ['my', 'my', 'flags-my'],
282 ['mz', 'mz', 'flags-mz'],
283 ['na', 'na', 'flags-na'],
284 ['nc', 'nc', 'flags-nc'],
285 ['ne', 'ne', 'flags-ne'],
286 ['nf', 'nf', 'flags-nf'],
287 ['ng', 'ng', 'flags-ng'],
288 ['ni', 'ni', 'flags-ni'],
289 ['nl', 'nl', 'flags-nl'],
290 ['no', 'no', 'flags-no'],
291 ['np', 'np', 'flags-np'],
292 ['nr', 'nr', 'flags-nr'],
293 ['nu', 'nu', 'flags-nu'],
294 ['nz', 'nz', 'flags-nz'],
295 ['om', 'om', 'flags-om'],
296 ['pa', 'pa', 'flags-pa'],
297 ['pe', 'pe', 'flags-pe'],
298 ['pf', 'pf', 'flags-pf'],
299 ['pg', 'pg', 'flags-pg'],
300 ['ph', 'ph', 'flags-ph'],
301 ['pk', 'pk', 'flags-pk'],
302 ['pl', 'pl', 'flags-pl'],
303 ['pm', 'pm', 'flags-pm'],
304 ['pn', 'pn', 'flags-pn'],
305 ['pr', 'pr', 'flags-pr'],
306 ['ps', 'ps', 'flags-ps'],
307 ['pt', 'pt', 'flags-pt'],
308 ['pw', 'pw', 'flags-pw'],
309 ['py', 'py', 'flags-py'],
310 ['qa', 'qa', 'flags-qa'],
311 ['qc', 'qc', 'flags-qc'],
312 ['re', 're', 'flags-re'],
313 ['ro', 'ro', 'flags-ro'],
314 ['rs', 'rs', 'flags-rs'],
315 ['ru', 'ru', 'flags-ru'],
316 ['rw', 'rw', 'flags-rw'],
317 ['sa', 'sa', 'flags-sa'],
318 ['sb', 'sb', 'flags-sb'],
319 ['sc', 'sc', 'flags-sc'],
320 ['gb-sct', 'gb-sct', 'flags-gb-sct'],
321 ['sd', 'sd', 'flags-sd'],
322 ['se', 'se', 'flags-se'],
323 ['sg', 'sg', 'flags-sg'],
324 ['sh', 'sh', 'flags-sh'],
325 ['si', 'si', 'flags-si'],
326 ['sj', 'sj', 'flags-sj'],
327 ['sk', 'sk', 'flags-sk'],
328 ['sl', 'sl', 'flags-sl'],
329 ['sm', 'sm', 'flags-sm'],
330 ['sn', 'sn', 'flags-sn'],
331 ['so', 'so', 'flags-so'],
332 ['sr', 'sr', 'flags-sr'],
333 ['st', 'st', 'flags-st'],
334 ['sv', 'sv', 'flags-sv'],
335 ['sy', 'sy', 'flags-sy'],
336 ['sz', 'sz', 'flags-sz'],
337 ['tc', 'tc', 'flags-tc'],
338 ['td', 'td', 'flags-td'],
339 ['tf', 'tf', 'flags-tf'],
340 ['tg', 'tg', 'flags-tg'],
341 ['th', 'th', 'flags-th'],
342 ['tj', 'tj', 'flags-tj'],
343 ['tk', 'tk', 'flags-tk'],
344 ['tl', 'tl', 'flags-tl'],
345 ['tm', 'tm', 'flags-tm'],
346 ['tn', 'tn', 'flags-tn'],
347 ['to', 'to', 'flags-to'],
348 ['tr', 'tr', 'flags-tr'],
349 ['tt', 'tt', 'flags-tt'],
350 ['tv', 'tv', 'flags-tv'],
351 ['tw', 'tw', 'flags-tw'],
352 ['tz', 'tz', 'flags-tz'],
353 ['ua', 'ua', 'flags-ua'],
354 ['ug', 'ug', 'flags-ug'],
355 ['um', 'um', 'flags-um'],
356 ['us', 'us', 'flags-us'],
357 ['uy', 'uy', 'flags-uy'],
358 ['uz', 'uz', 'flags-uz'],
359 ['va', 'va', 'flags-va'],
360 ['vc', 'vc', 'flags-vc'],
361 ['ve', 've', 'flags-ve'],
362 ['vg', 'vg', 'flags-vg'],
363 ['vi', 'vi', 'flags-vi'],
364 ['vn', 'vn', 'flags-vn'],
365 ['vu', 'vu', 'flags-vu'],
366 ['gb-wls', 'gb-wls', 'flags-gb-wls'],
367 ['wf', 'wf', 'flags-wf'],
368 ['ws', 'ws', 'flags-ws'],
369 ['ye', 'ye', 'flags-ye'],
370 ['yt', 'yt', 'flags-yt'],
371 ['za', 'za', 'flags-za'],
372 ['zm', 'zm', 'flags-zm'],
373 ['zw', 'zw', 'flags-zw'],
374 ],
375 'size' => 1,
376 'minitems' => 0,
377 'maxitems' => 1,
378 'fieldWizard' => [
379 'selectIcons' => [
380 'disabled' => false,
381 ],
382 ],
383 ],
384 ],
385 'fallbackType' => [
386 'label' => 'LLL:EXT:backend/Resources/Private/Language/locallang_siteconfiguration_tca.xlf:site_language.fallbackType',
387 'displayCond' => 'FIELD:languageId:>:0',
388 'onChange' => 'reload',
389 'config' => [
390 'type' => 'select',
391 'renderType' => 'selectSingle',
392 'items' => [
393 ['No fallback (strict)', 'strict'],
394 ['Fallback to other language', 'fallback'],
395 ],
396 ],
397 ],
398 'fallbacks' => [
399 'label' => 'LLL:EXT:backend/Resources/Private/Language/locallang_siteconfiguration_tca.xlf:site_language.fallbacks',
400 'displayCond' => 'FIELD:fallbackType:=:fallback',
401 'config' => [
402 'type' => 'select',
403 'renderType' => 'selectMultipleSideBySide',
404 'items' => [
405 ['Default Language', 0],
406 ],
407 'foreign_table' => 'sys_language',
408 'size' => 5,
409 'min' => 0,
410 ],
411 ],
412 ],
413 'types' => [
414 '1' => [
415 'showitem' => 'languageId, title, navigationTitle, base, locale, iso-639-1, hreflang, direction, typo3Language, flag, fallbackType, fallbacks, enabled',
416 ],
417 ],
418 ];