pictcode / lib / Cake / Test / Case / I18n / L10nTest.php @ 0b1b8047
履歴 | 表示 | アノテート | ダウンロード (44.947 KB)
1 |
<?php
|
---|---|
2 |
/**
|
3 |
* L10nTest file
|
4 |
*
|
5 |
* CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
|
6 |
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
7 |
*
|
8 |
* Licensed under The MIT License
|
9 |
* For full copyright and license information, please see the LICENSE.txt
|
10 |
* Redistributions of files must retain the above copyright notice
|
11 |
*
|
12 |
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
13 |
* @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
|
14 |
* @package Cake.Test.Case.I18n
|
15 |
* @since CakePHP(tm) v 1.2.0.5432
|
16 |
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
17 |
*/
|
18 |
|
19 |
App::uses('L10n', 'I18n'); |
20 |
|
21 |
/**
|
22 |
* L10nTest class
|
23 |
*
|
24 |
* @package Cake.Test.Case.I18n
|
25 |
*/
|
26 |
class L10nTest extends CakeTestCase { |
27 |
|
28 |
/**
|
29 |
* setUp method
|
30 |
*
|
31 |
* @return void
|
32 |
*/
|
33 |
public function setUp() { |
34 |
parent::setUp();
|
35 |
Configure::delete('Config.language'); |
36 |
} |
37 |
|
38 |
/**
|
39 |
* testGet method
|
40 |
*
|
41 |
* @return void
|
42 |
*/
|
43 |
public function testGet() { |
44 |
$localize = new L10n(); |
45 |
|
46 |
// Catalog Entry
|
47 |
$lang = $localize->get('en'); |
48 |
|
49 |
$this->assertEquals('en', $lang); |
50 |
$this->assertEquals('English', $localize->language); |
51 |
$this->assertEquals(array('eng'), $localize->languagePath); |
52 |
$this->assertEquals('eng', $localize->locale); |
53 |
|
54 |
// Map Entry
|
55 |
$localize->get('eng'); |
56 |
|
57 |
$this->assertEquals('English', $localize->language); |
58 |
$this->assertEquals(array('eng'), $localize->languagePath); |
59 |
$this->assertEquals('eng', $localize->locale); |
60 |
|
61 |
// Catalog Entry
|
62 |
$localize->get('en-ca'); |
63 |
|
64 |
$this->assertEquals('English (Canadian)', $localize->language); |
65 |
$this->assertEquals(array('en_ca', 'eng'), $localize->languagePath); |
66 |
$this->assertEquals('en_ca', $localize->locale); |
67 |
|
68 |
// Default Entry
|
69 |
$localize->default = 'en-us'; |
70 |
$lang = $localize->get('use_default'); |
71 |
|
72 |
$this->assertEquals('en-us', $lang); |
73 |
$this->assertEquals('English (United States)', $localize->language); |
74 |
$this->assertEquals(array('en_us', 'eng'), $localize->languagePath); |
75 |
$this->assertEquals('en_us', $localize->locale); |
76 |
|
77 |
$localize->get('es'); |
78 |
$localize->get(''); |
79 |
$this->assertEquals('en-us', $localize->lang); |
80 |
} |
81 |
|
82 |
/**
|
83 |
* testGetAutoLanguage method
|
84 |
*
|
85 |
* @return void
|
86 |
*/
|
87 |
public function testGetAutoLanguage() { |
88 |
$serverBackup = $_SERVER; |
89 |
$_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'inexistent,en-ca'; |
90 |
|
91 |
$localize = new L10n(); |
92 |
$lang = $localize->get(); |
93 |
|
94 |
$this->assertEquals('en-ca', $lang); |
95 |
$this->assertEquals('English (Canadian)', $localize->language); |
96 |
$this->assertEquals(array('en_ca', 'eng'), $localize->languagePath); |
97 |
$this->assertEquals('en_ca', $localize->locale); |
98 |
|
99 |
$_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'es_mx'; |
100 |
$lang = $localize->get(); |
101 |
|
102 |
$this->assertEquals('es-mx', $lang); |
103 |
$this->assertEquals('Spanish (Mexican)', $localize->language); |
104 |
$this->assertEquals(array('es_mx', 'spa'), $localize->languagePath); |
105 |
$this->assertEquals('es_mx', $localize->locale); |
106 |
|
107 |
$localize = new L10n(); |
108 |
$localize->default = 'en-us'; |
109 |
$lang = $localize->get(); |
110 |
$this->assertEquals(array('es_mx', 'spa', 'eng'), $localize->languagePath); |
111 |
|
112 |
$_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'en_xy,en_ca'; |
113 |
$localize->get();
|
114 |
|
115 |
$this->assertEquals('English', $localize->language); |
116 |
$this->assertEquals(array('eng'), $localize->languagePath); |
117 |
$this->assertEquals('eng', $localize->locale); |
118 |
|
119 |
$_SERVER = $serverBackup; |
120 |
} |
121 |
|
122 |
/**
|
123 |
* testGet method with deprecated constant DEFAULT_LANGUAGE
|
124 |
*
|
125 |
* @return void
|
126 |
*/
|
127 |
public function testGetWithDeprecatedConstant() { |
128 |
$this->skipIf(defined('DEFAULT_LANGUAGE'), 'Cannot re-define already defined constant.'); |
129 |
|
130 |
define('DEFAULT_LANGUAGE', 'en-us'); |
131 |
$localize = new L10n(); |
132 |
|
133 |
$lang = $localize->get('use_default'); |
134 |
|
135 |
$this->assertEquals('en-us', $lang); |
136 |
$this->assertEquals('English (United States)', $localize->language); |
137 |
$this->assertEquals(array('en_us', 'eng'), $localize->languagePath); |
138 |
$this->assertEquals('en_us', $localize->locale); |
139 |
|
140 |
$localize = new L10n(); |
141 |
|
142 |
$lang = $localize->get(); |
143 |
|
144 |
$this->assertEquals('en-us', $lang); |
145 |
$this->assertEquals('English (United States)', $localize->language); |
146 |
$this->assertEquals(array('en_us', 'eng'), $localize->languagePath); |
147 |
$this->assertEquals('en_us', $localize->locale); |
148 |
} |
149 |
|
150 |
/**
|
151 |
* testMap method
|
152 |
*
|
153 |
* @return void
|
154 |
*/
|
155 |
public function testMap() { |
156 |
$localize = new L10n(); |
157 |
|
158 |
$result = $localize->map(array('afr', 'af')); |
159 |
$expected = array('afr' => 'af', 'af' => 'afr'); |
160 |
$this->assertEquals($expected, $result); |
161 |
|
162 |
$result = $localize->map(array('sqi', 'sq')); |
163 |
$expected = array('sqi' => 'sq', 'sq' => 'sqi'); |
164 |
$this->assertEquals($expected, $result); |
165 |
|
166 |
$result = $localize->map(array('alb', 'sq')); |
167 |
$expected = array('alb' => 'sq', 'sq' => 'sqi'); |
168 |
$this->assertEquals($expected, $result); |
169 |
|
170 |
$result = $localize->map(array('ara', 'ar')); |
171 |
$expected = array('ara' => 'ar', 'ar' => 'ara'); |
172 |
$this->assertEquals($expected, $result); |
173 |
|
174 |
$result = $localize->map(array('hye', 'hy')); |
175 |
$expected = array('hye' => 'hy', 'hy' => 'hye'); |
176 |
$this->assertEquals($expected, $result); |
177 |
|
178 |
$result = $localize->map(array('eus', 'eu')); |
179 |
$expected = array('eus' => 'eu', 'eu' => 'eus'); |
180 |
$this->assertEquals($expected, $result); |
181 |
|
182 |
$result = $localize->map(array('baq', 'eu')); |
183 |
$expected = array('baq' => 'eu', 'eu' => 'eus'); |
184 |
$this->assertEquals($expected, $result); |
185 |
|
186 |
$result = $localize->map(array('bos', 'bs')); |
187 |
$expected = array('bos' => 'bs', 'bs' => 'bos'); |
188 |
$this->assertEquals($expected, $result); |
189 |
|
190 |
$result = $localize->map(array('bul', 'bg')); |
191 |
$expected = array('bul' => 'bg', 'bg' => 'bul'); |
192 |
$this->assertEquals($expected, $result); |
193 |
|
194 |
$result = $localize->map(array('bel', 'be')); |
195 |
$expected = array('bel' => 'be', 'be' => 'bel'); |
196 |
$this->assertEquals($expected, $result); |
197 |
|
198 |
$result = $localize->map(array('cat', 'ca')); |
199 |
$expected = array('cat' => 'ca', 'ca' => 'cat'); |
200 |
$this->assertEquals($expected, $result); |
201 |
|
202 |
$result = $localize->map(array('chi', 'zh')); |
203 |
$expected = array('chi' => 'zh', 'zh' => 'zho'); |
204 |
$this->assertEquals($expected, $result); |
205 |
|
206 |
$result = $localize->map(array('zho', 'zh')); |
207 |
$expected = array('zho' => 'zh', 'zh' => 'zho'); |
208 |
$this->assertEquals($expected, $result); |
209 |
|
210 |
$result = $localize->map(array('hrv', 'hr')); |
211 |
$expected = array('hrv' => 'hr', 'hr' => 'hrv'); |
212 |
$this->assertEquals($expected, $result); |
213 |
|
214 |
$result = $localize->map(array('ces', 'cs')); |
215 |
$expected = array('ces' => 'cs', 'cs' => 'ces'); |
216 |
$this->assertEquals($expected, $result); |
217 |
|
218 |
$result = $localize->map(array('cze', 'cs')); |
219 |
$expected = array('cze' => 'cs', 'cs' => 'ces'); |
220 |
$this->assertEquals($expected, $result); |
221 |
|
222 |
$result = $localize->map(array('dan', 'da')); |
223 |
$expected = array('dan' => 'da', 'da' => 'dan'); |
224 |
$this->assertEquals($expected, $result); |
225 |
|
226 |
$result = $localize->map(array('dut', 'nl')); |
227 |
$expected = array('dut' => 'nl', 'nl' => 'nld'); |
228 |
$this->assertEquals($expected, $result); |
229 |
|
230 |
$result = $localize->map(array('nld', 'nl')); |
231 |
$expected = array('nld' => 'nl', 'nl' => 'nld'); |
232 |
$this->assertEquals($expected, $result); |
233 |
|
234 |
$result = $localize->map(array('nld')); |
235 |
$expected = array('nld' => 'nl'); |
236 |
$this->assertEquals($expected, $result); |
237 |
|
238 |
$result = $localize->map(array('dut')); |
239 |
$expected = array('dut' => 'nl'); |
240 |
$this->assertEquals($expected, $result); |
241 |
|
242 |
$result = $localize->map(array('eng', 'en')); |
243 |
$expected = array('eng' => 'en', 'en' => 'eng'); |
244 |
$this->assertEquals($expected, $result); |
245 |
|
246 |
$result = $localize->map(array('est', 'et')); |
247 |
$expected = array('est' => 'et', 'et' => 'est'); |
248 |
$this->assertEquals($expected, $result); |
249 |
|
250 |
$result = $localize->map(array('fao', 'fo')); |
251 |
$expected = array('fao' => 'fo', 'fo' => 'fao'); |
252 |
$this->assertEquals($expected, $result); |
253 |
|
254 |
$result = $localize->map(array('fas', 'fa')); |
255 |
$expected = array('fas' => 'fa', 'fa' => 'fas'); |
256 |
$this->assertEquals($expected, $result); |
257 |
|
258 |
$result = $localize->map(array('per', 'fa')); |
259 |
$expected = array('per' => 'fa', 'fa' => 'fas'); |
260 |
$this->assertEquals($expected, $result); |
261 |
|
262 |
$result = $localize->map(array('fin', 'fi')); |
263 |
$expected = array('fin' => 'fi', 'fi' => 'fin'); |
264 |
$this->assertEquals($expected, $result); |
265 |
|
266 |
$result = $localize->map(array('fra', 'fr')); |
267 |
$expected = array('fra' => 'fr', 'fr' => 'fra'); |
268 |
$this->assertEquals($expected, $result); |
269 |
|
270 |
$result = $localize->map(array('fre', 'fr')); |
271 |
$expected = array('fre' => 'fr', 'fr' => 'fra'); |
272 |
$this->assertEquals($expected, $result); |
273 |
|
274 |
$result = $localize->map(array('gla', 'gd')); |
275 |
$expected = array('gla' => 'gd', 'gd' => 'gla'); |
276 |
$this->assertEquals($expected, $result); |
277 |
|
278 |
$result = $localize->map(array('glg', 'gl')); |
279 |
$expected = array('glg' => 'gl', 'gl' => 'glg'); |
280 |
$this->assertEquals($expected, $result); |
281 |
|
282 |
$result = $localize->map(array('deu', 'de')); |
283 |
$expected = array('deu' => 'de', 'de' => 'deu'); |
284 |
$this->assertEquals($expected, $result); |
285 |
|
286 |
$result = $localize->map(array('ger', 'de')); |
287 |
$expected = array('ger' => 'de', 'de' => 'deu'); |
288 |
$this->assertEquals($expected, $result); |
289 |
|
290 |
$result = $localize->map(array('ell', 'el')); |
291 |
$expected = array('ell' => 'el', 'el' => 'gre'); |
292 |
$this->assertEquals($expected, $result); |
293 |
|
294 |
$result = $localize->map(array('gre', 'el')); |
295 |
$expected = array('gre' => 'el', 'el' => 'gre'); |
296 |
$this->assertEquals($expected, $result); |
297 |
|
298 |
$result = $localize->map(array('heb', 'he')); |
299 |
$expected = array('heb' => 'he', 'he' => 'heb'); |
300 |
$this->assertEquals($expected, $result); |
301 |
|
302 |
$result = $localize->map(array('hin', 'hi')); |
303 |
$expected = array('hin' => 'hi', 'hi' => 'hin'); |
304 |
$this->assertEquals($expected, $result); |
305 |
|
306 |
$result = $localize->map(array('hun', 'hu')); |
307 |
$expected = array('hun' => 'hu', 'hu' => 'hun'); |
308 |
$this->assertEquals($expected, $result); |
309 |
|
310 |
$result = $localize->map(array('ice', 'is')); |
311 |
$expected = array('ice' => 'is', 'is' => 'isl'); |
312 |
$this->assertEquals($expected, $result); |
313 |
|
314 |
$result = $localize->map(array('isl', 'is')); |
315 |
$expected = array('isl' => 'is', 'is' => 'isl'); |
316 |
$this->assertEquals($expected, $result); |
317 |
|
318 |
$result = $localize->map(array('ind', 'id')); |
319 |
$expected = array('ind' => 'id', 'id' => 'ind'); |
320 |
$this->assertEquals($expected, $result); |
321 |
|
322 |
$result = $localize->map(array('gle', 'ga')); |
323 |
$expected = array('gle' => 'ga', 'ga' => 'gle'); |
324 |
$this->assertEquals($expected, $result); |
325 |
|
326 |
$result = $localize->map(array('ita', 'it')); |
327 |
$expected = array('ita' => 'it', 'it' => 'ita'); |
328 |
$this->assertEquals($expected, $result); |
329 |
|
330 |
$result = $localize->map(array('jpn', 'ja')); |
331 |
$expected = array('jpn' => 'ja', 'ja' => 'jpn'); |
332 |
$this->assertEquals($expected, $result); |
333 |
|
334 |
$result = $localize->map(array('kaz', 'kk')); |
335 |
$expected = array('kaz' => 'kk', 'kk' => 'kaz'); |
336 |
$this->assertEquals($expected, $result); |
337 |
|
338 |
$result = $localize->map(array('kor', 'ko')); |
339 |
$expected = array('kor' => 'ko', 'ko' => 'kor'); |
340 |
$this->assertEquals($expected, $result); |
341 |
|
342 |
$result = $localize->map(array('lav', 'lv')); |
343 |
$expected = array('lav' => 'lv', 'lv' => 'lav'); |
344 |
$this->assertEquals($expected, $result); |
345 |
|
346 |
$result = $localize->map(array('lit', 'lt')); |
347 |
$expected = array('lit' => 'lt', 'lt' => 'lit'); |
348 |
$this->assertEquals($expected, $result); |
349 |
|
350 |
$result = $localize->map(array('mac', 'mk')); |
351 |
$expected = array('mac' => 'mk', 'mk' => 'mkd'); |
352 |
$this->assertEquals($expected, $result); |
353 |
|
354 |
$result = $localize->map(array('mkd', 'mk')); |
355 |
$expected = array('mkd' => 'mk', 'mk' => 'mkd'); |
356 |
$this->assertEquals($expected, $result); |
357 |
|
358 |
$result = $localize->map(array('may', 'ms')); |
359 |
$expected = array('may' => 'ms', 'ms' => 'msa'); |
360 |
$this->assertEquals($expected, $result); |
361 |
|
362 |
$result = $localize->map(array('msa', 'ms')); |
363 |
$expected = array('msa' => 'ms', 'ms' => 'msa'); |
364 |
$this->assertEquals($expected, $result); |
365 |
|
366 |
$result = $localize->map(array('mlt', 'mt')); |
367 |
$expected = array('mlt' => 'mt', 'mt' => 'mlt'); |
368 |
$this->assertEquals($expected, $result); |
369 |
|
370 |
$result = $localize->map(array('nor', 'no')); |
371 |
$expected = array('nor' => 'no', 'no' => 'nor'); |
372 |
$this->assertEquals($expected, $result); |
373 |
|
374 |
$result = $localize->map(array('nob', 'nb')); |
375 |
$expected = array('nob' => 'nb', 'nb' => 'nob'); |
376 |
$this->assertEquals($expected, $result); |
377 |
|
378 |
$result = $localize->map(array('nno', 'nn')); |
379 |
$expected = array('nno' => 'nn', 'nn' => 'nno'); |
380 |
$this->assertEquals($expected, $result); |
381 |
|
382 |
$result = $localize->map(array('pol', 'pl')); |
383 |
$expected = array('pol' => 'pl', 'pl' => 'pol'); |
384 |
$this->assertEquals($expected, $result); |
385 |
|
386 |
$result = $localize->map(array('por', 'pt')); |
387 |
$expected = array('por' => 'pt', 'pt' => 'por'); |
388 |
$this->assertEquals($expected, $result); |
389 |
|
390 |
$result = $localize->map(array('roh', 'rm')); |
391 |
$expected = array('roh' => 'rm', 'rm' => 'roh'); |
392 |
$this->assertEquals($expected, $result); |
393 |
|
394 |
$result = $localize->map(array('ron', 'ro')); |
395 |
$expected = array('ron' => 'ro', 'ro' => 'ron'); |
396 |
$this->assertEquals($expected, $result); |
397 |
|
398 |
$result = $localize->map(array('rum', 'ro')); |
399 |
$expected = array('rum' => 'ro', 'ro' => 'ron'); |
400 |
$this->assertEquals($expected, $result); |
401 |
|
402 |
$result = $localize->map(array('rus', 'ru')); |
403 |
$expected = array('rus' => 'ru', 'ru' => 'rus'); |
404 |
$this->assertEquals($expected, $result); |
405 |
|
406 |
$result = $localize->map(array('sme', 'se')); |
407 |
$expected = array('sme' => 'se', 'se' => 'sme'); |
408 |
$this->assertEquals($expected, $result); |
409 |
|
410 |
$result = $localize->map(array('srp', 'sr')); |
411 |
$expected = array('srp' => 'sr', 'sr' => 'srp'); |
412 |
$this->assertEquals($expected, $result); |
413 |
|
414 |
$result = $localize->map(array('slk', 'sk')); |
415 |
$expected = array('slk' => 'sk', 'sk' => 'slk'); |
416 |
$this->assertEquals($expected, $result); |
417 |
|
418 |
$result = $localize->map(array('slo', 'sk')); |
419 |
$expected = array('slo' => 'sk', 'sk' => 'slk'); |
420 |
$this->assertEquals($expected, $result); |
421 |
|
422 |
$result = $localize->map(array('slv', 'sl')); |
423 |
$expected = array('slv' => 'sl', 'sl' => 'slv'); |
424 |
$this->assertEquals($expected, $result); |
425 |
|
426 |
$result = $localize->map(array('wen', 'sb')); |
427 |
$expected = array('wen' => 'sb', 'sb' => 'wen'); |
428 |
$this->assertEquals($expected, $result); |
429 |
|
430 |
$result = $localize->map(array('spa', 'es')); |
431 |
$expected = array('spa' => 'es', 'es' => 'spa'); |
432 |
$this->assertEquals($expected, $result); |
433 |
|
434 |
$result = $localize->map(array('swe', 'sv')); |
435 |
$expected = array('swe' => 'sv', 'sv' => 'swe'); |
436 |
$this->assertEquals($expected, $result); |
437 |
|
438 |
$result = $localize->map(array('tha', 'th')); |
439 |
$expected = array('tha' => 'th', 'th' => 'tha'); |
440 |
$this->assertEquals($expected, $result); |
441 |
|
442 |
$result = $localize->map(array('tso', 'ts')); |
443 |
$expected = array('tso' => 'ts', 'ts' => 'tso'); |
444 |
$this->assertEquals($expected, $result); |
445 |
|
446 |
$result = $localize->map(array('tsn', 'tn')); |
447 |
$expected = array('tsn' => 'tn', 'tn' => 'tsn'); |
448 |
$this->assertEquals($expected, $result); |
449 |
|
450 |
$result = $localize->map(array('tur', 'tr')); |
451 |
$expected = array('tur' => 'tr', 'tr' => 'tur'); |
452 |
$this->assertEquals($expected, $result); |
453 |
|
454 |
$result = $localize->map(array('ukr', 'uk')); |
455 |
$expected = array('ukr' => 'uk', 'uk' => 'ukr'); |
456 |
$this->assertEquals($expected, $result); |
457 |
|
458 |
$result = $localize->map(array('urd', 'ur')); |
459 |
$expected = array('urd' => 'ur', 'ur' => 'urd'); |
460 |
$this->assertEquals($expected, $result); |
461 |
|
462 |
$result = $localize->map(array('ven', 've')); |
463 |
$expected = array('ven' => 've', 've' => 'ven'); |
464 |
$this->assertEquals($expected, $result); |
465 |
|
466 |
$result = $localize->map(array('vie', 'vi')); |
467 |
$expected = array('vie' => 'vi', 'vi' => 'vie'); |
468 |
$this->assertEquals($expected, $result); |
469 |
|
470 |
$result = $localize->map(array('xho', 'xh')); |
471 |
$expected = array('xho' => 'xh', 'xh' => 'xho'); |
472 |
$this->assertEquals($expected, $result); |
473 |
|
474 |
$result = $localize->map(array('cy', 'cym')); |
475 |
$expected = array('cym' => 'cy', 'cy' => 'cym'); |
476 |
$this->assertEquals($expected, $result); |
477 |
|
478 |
$result = $localize->map(array('yid', 'yi')); |
479 |
$expected = array('yid' => 'yi', 'yi' => 'yid'); |
480 |
$this->assertEquals($expected, $result); |
481 |
|
482 |
$result = $localize->map(array('zul', 'zu')); |
483 |
$expected = array('zul' => 'zu', 'zu' => 'zul'); |
484 |
$this->assertEquals($expected, $result); |
485 |
} |
486 |
|
487 |
/**
|
488 |
* testCatalog method
|
489 |
*
|
490 |
* @return void
|
491 |
*/
|
492 |
public function testCatalog() { |
493 |
$localize = new L10n(); |
494 |
|
495 |
$result = $localize->catalog(array('af')); |
496 |
$expected = array( |
497 |
'af' => array('language' => 'Afrikaans', 'locale' => 'afr', 'localeFallback' => 'afr', 'charset' => 'utf-8', 'direction' => 'ltr') |
498 |
); |
499 |
$this->assertEquals($expected, $result); |
500 |
|
501 |
$result = $localize->catalog(array('ar', 'ar-ae', 'ar-bh', 'ar-dz', 'ar-eg', 'ar-iq', 'ar-jo', 'ar-kw', 'ar-lb', 'ar-ly', 'ar-ma', |
502 |
'ar-om', 'ar-qa', 'ar-sa', 'ar-sy', 'ar-tn', 'ar-ye')); |
503 |
$expected = array( |
504 |
'ar' => array('language' => 'Arabic', 'locale' => 'ara', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), |
505 |
'ar-ae' => array('language' => 'Arabic (U.A.E.)', 'locale' => 'ar_ae', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), |
506 |
'ar-bh' => array('language' => 'Arabic (Bahrain)', 'locale' => 'ar_bh', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), |
507 |
'ar-dz' => array('language' => 'Arabic (Algeria)', 'locale' => 'ar_dz', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), |
508 |
'ar-eg' => array('language' => 'Arabic (Egypt)', 'locale' => 'ar_eg', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), |
509 |
'ar-iq' => array('language' => 'Arabic (Iraq)', 'locale' => 'ar_iq', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), |
510 |
'ar-jo' => array('language' => 'Arabic (Jordan)', 'locale' => 'ar_jo', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), |
511 |
'ar-kw' => array('language' => 'Arabic (Kuwait)', 'locale' => 'ar_kw', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), |
512 |
'ar-lb' => array('language' => 'Arabic (Lebanon)', 'locale' => 'ar_lb', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), |
513 |
'ar-ly' => array('language' => 'Arabic (Libya)', 'locale' => 'ar_ly', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), |
514 |
'ar-ma' => array('language' => 'Arabic (Morocco)', 'locale' => 'ar_ma', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), |
515 |
'ar-om' => array('language' => 'Arabic (Oman)', 'locale' => 'ar_om', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), |
516 |
'ar-qa' => array('language' => 'Arabic (Qatar)', 'locale' => 'ar_qa', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), |
517 |
'ar-sa' => array('language' => 'Arabic (Saudi Arabia)', 'locale' => 'ar_sa', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), |
518 |
'ar-sy' => array('language' => 'Arabic (Syria)', 'locale' => 'ar_sy', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), |
519 |
'ar-tn' => array('language' => 'Arabic (Tunisia)', 'locale' => 'ar_tn', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), |
520 |
'ar-ye' => array('language' => 'Arabic (Yemen)', 'locale' => 'ar_ye', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl') |
521 |
); |
522 |
$this->assertEquals($expected, $result); |
523 |
|
524 |
$result = $localize->catalog(array('be')); |
525 |
$expected = array( |
526 |
'be' => array('language' => 'Byelorussian', 'locale' => 'bel', 'localeFallback' => 'bel', 'charset' => 'utf-8', 'direction' => 'ltr') |
527 |
); |
528 |
$this->assertEquals($expected, $result); |
529 |
|
530 |
$result = $localize->catalog(array('bg')); |
531 |
$expected = array( |
532 |
'bg' => array('language' => 'Bulgarian', 'locale' => 'bul', 'localeFallback' => 'bul', 'charset' => 'utf-8', 'direction' => 'ltr') |
533 |
); |
534 |
$this->assertEquals($expected, $result); |
535 |
|
536 |
$result = $localize->catalog(array('bs')); |
537 |
$expected = array( |
538 |
'bs' => array('language' => 'Bosnian', 'locale' => 'bos', 'localeFallback' => 'bos', 'charset' => 'utf-8', 'direction' => 'ltr') |
539 |
); |
540 |
$this->assertEquals($expected, $result); |
541 |
|
542 |
$result = $localize->catalog(array('ca')); |
543 |
$expected = array( |
544 |
'ca' => array('language' => 'Catalan', 'locale' => 'cat', 'localeFallback' => 'cat', 'charset' => 'utf-8', 'direction' => 'ltr') |
545 |
); |
546 |
$this->assertEquals($expected, $result); |
547 |
|
548 |
$result = $localize->catalog(array('cs')); |
549 |
$expected = array( |
550 |
'cs' => array('language' => 'Czech', 'locale' => 'ces', 'localeFallback' => 'ces', 'charset' => 'utf-8', 'direction' => 'ltr') |
551 |
); |
552 |
$this->assertEquals($expected, $result); |
553 |
|
554 |
$result = $localize->catalog(array('da')); |
555 |
$expected = array( |
556 |
'da' => array('language' => 'Danish', 'locale' => 'dan', 'localeFallback' => 'dan', 'charset' => 'utf-8', 'direction' => 'ltr') |
557 |
); |
558 |
$this->assertEquals($expected, $result); |
559 |
|
560 |
$result = $localize->catalog(array('de', 'de-at', 'de-ch', 'de-de', 'de-li', 'de-lu')); |
561 |
$expected = array( |
562 |
'de' => array('language' => 'German (Standard)', 'locale' => 'deu', 'localeFallback' => 'deu', 'charset' => 'utf-8', 'direction' => 'ltr'), |
563 |
'de-at' => array('language' => 'German (Austria)', 'locale' => 'de_at', 'localeFallback' => 'deu', 'charset' => 'utf-8', 'direction' => 'ltr'), |
564 |
'de-ch' => array('language' => 'German (Swiss)', 'locale' => 'de_ch', 'localeFallback' => 'deu', 'charset' => 'utf-8', 'direction' => 'ltr'), |
565 |
'de-de' => array('language' => 'German (Germany)', 'locale' => 'de_de', 'localeFallback' => 'deu', 'charset' => 'utf-8', 'direction' => 'ltr'), |
566 |
'de-li' => array('language' => 'German (Liechtenstein)', 'locale' => 'de_li', 'localeFallback' => 'deu', 'charset' => 'utf-8', 'direction' => 'ltr'), |
567 |
'de-lu' => array('language' => 'German (Luxembourg)', 'locale' => 'de_lu', 'localeFallback' => 'deu', 'charset' => 'utf-8', 'direction' => 'ltr') |
568 |
); |
569 |
$this->assertEquals($expected, $result); |
570 |
|
571 |
$result = $localize->catalog(array('el')); |
572 |
$expected = array( |
573 |
'el' => array('language' => 'Greek', 'locale' => 'ell', 'localeFallback' => 'ell', 'charset' => 'utf-8', 'direction' => 'ltr') |
574 |
); |
575 |
$this->assertEquals($expected, $result); |
576 |
|
577 |
$result = $localize->catalog(array('en', 'en-au', 'en-bz', 'en-ca', 'en-gb', 'en-ie', 'en-jm', 'en-nz', 'en-tt', 'en-us', 'en-za')); |
578 |
$expected = array( |
579 |
'en' => array('language' => 'English', 'locale' => 'eng', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), |
580 |
'en-au' => array('language' => 'English (Australian)', 'locale' => 'en_au', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), |
581 |
'en-bz' => array('language' => 'English (Belize)', 'locale' => 'en_bz', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), |
582 |
'en-ca' => array('language' => 'English (Canadian)', 'locale' => 'en_ca', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), |
583 |
'en-gb' => array('language' => 'English (British)', 'locale' => 'en_gb', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), |
584 |
'en-ie' => array('language' => 'English (Ireland)', 'locale' => 'en_ie', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), |
585 |
'en-jm' => array('language' => 'English (Jamaica)', 'locale' => 'en_jm', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), |
586 |
'en-nz' => array('language' => 'English (New Zealand)', 'locale' => 'en_nz', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), |
587 |
'en-tt' => array('language' => 'English (Trinidad)', 'locale' => 'en_tt', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), |
588 |
'en-us' => array('language' => 'English (United States)', 'locale' => 'en_us', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), |
589 |
'en-za' => array('language' => 'English (South Africa)', 'locale' => 'en_za', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr') |
590 |
); |
591 |
$this->assertEquals($expected, $result); |
592 |
|
593 |
$result = $localize->catalog(array('es', 'es-ar', 'es-bo', 'es-cl', 'es-co', 'es-cr', 'es-do', 'es-ec', 'es-es', 'es-gt', 'es-hn', |
594 |
'es-mx', 'es-ni', 'es-pa', 'es-pe', 'es-pr', 'es-py', 'es-sv', 'es-uy', 'es-ve')); |
595 |
$expected = array( |
596 |
'es' => array('language' => 'Spanish (Spain - Traditional)', 'locale' => 'spa', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), |
597 |
'es-ar' => array('language' => 'Spanish (Argentina)', 'locale' => 'es_ar', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), |
598 |
'es-bo' => array('language' => 'Spanish (Bolivia)', 'locale' => 'es_bo', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), |
599 |
'es-cl' => array('language' => 'Spanish (Chile)', 'locale' => 'es_cl', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), |
600 |
'es-co' => array('language' => 'Spanish (Colombia)', 'locale' => 'es_co', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), |
601 |
'es-cr' => array('language' => 'Spanish (Costa Rica)', 'locale' => 'es_cr', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), |
602 |
'es-do' => array('language' => 'Spanish (Dominican Republic)', 'locale' => 'es_do', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), |
603 |
'es-ec' => array('language' => 'Spanish (Ecuador)', 'locale' => 'es_ec', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), |
604 |
'es-es' => array('language' => 'Spanish (Spain)', 'locale' => 'es_es', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), |
605 |
'es-gt' => array('language' => 'Spanish (Guatemala)', 'locale' => 'es_gt', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), |
606 |
'es-hn' => array('language' => 'Spanish (Honduras)', 'locale' => 'es_hn', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), |
607 |
'es-mx' => array('language' => 'Spanish (Mexican)', 'locale' => 'es_mx', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), |
608 |
'es-ni' => array('language' => 'Spanish (Nicaragua)', 'locale' => 'es_ni', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), |
609 |
'es-pa' => array('language' => 'Spanish (Panama)', 'locale' => 'es_pa', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), |
610 |
'es-pe' => array('language' => 'Spanish (Peru)', 'locale' => 'es_pe', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), |
611 |
'es-pr' => array('language' => 'Spanish (Puerto Rico)', 'locale' => 'es_pr', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), |
612 |
'es-py' => array('language' => 'Spanish (Paraguay)', 'locale' => 'es_py', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), |
613 |
'es-sv' => array('language' => 'Spanish (El Salvador)', 'locale' => 'es_sv', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), |
614 |
'es-uy' => array('language' => 'Spanish (Uruguay)', 'locale' => 'es_uy', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), |
615 |
'es-ve' => array('language' => 'Spanish (Venezuela)', 'locale' => 'es_ve', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr') |
616 |
); |
617 |
$this->assertEquals($expected, $result); |
618 |
|
619 |
$result = $localize->catalog(array('et')); |
620 |
$expected = array( |
621 |
'et' => array('language' => 'Estonian', 'locale' => 'est', 'localeFallback' => 'est', 'charset' => 'utf-8', 'direction' => 'ltr') |
622 |
); |
623 |
$this->assertEquals($expected, $result); |
624 |
|
625 |
$result = $localize->catalog(array('eu')); |
626 |
$expected = array( |
627 |
'eu' => array('language' => 'Basque', 'locale' => 'eus', 'localeFallback' => 'eus', 'charset' => 'utf-8', 'direction' => 'ltr') |
628 |
); |
629 |
$this->assertEquals($expected, $result); |
630 |
|
631 |
$result = $localize->catalog(array('fa')); |
632 |
$expected = array( |
633 |
'fa' => array('language' => 'Farsi', 'locale' => 'fas', 'localeFallback' => 'fas', 'charset' => 'utf-8', 'direction' => 'rtl') |
634 |
); |
635 |
$this->assertEquals($expected, $result); |
636 |
|
637 |
$result = $localize->catalog(array('fi')); |
638 |
$expected = array( |
639 |
'fi' => array('language' => 'Finnish', 'locale' => 'fin', 'localeFallback' => 'fin', 'charset' => 'utf-8', 'direction' => 'ltr') |
640 |
); |
641 |
$this->assertEquals($expected, $result); |
642 |
|
643 |
$result = $localize->catalog(array('fo')); |
644 |
$expected = array( |
645 |
'fo' => array('language' => 'Faeroese', 'locale' => 'fao', 'localeFallback' => 'fao', 'charset' => 'utf-8', 'direction' => 'ltr') |
646 |
); |
647 |
$this->assertEquals($expected, $result); |
648 |
|
649 |
$result = $localize->catalog(array('fr', 'fr-be', 'fr-ca', 'fr-ch', 'fr-fr', 'fr-lu')); |
650 |
$expected = array( |
651 |
'fr' => array('language' => 'French (Standard)', 'locale' => 'fra', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'), |
652 |
'fr-be' => array('language' => 'French (Belgium)', 'locale' => 'fr_be', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'), |
653 |
'fr-ca' => array('language' => 'French (Canadian)', 'locale' => 'fr_ca', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'), |
654 |
'fr-ch' => array('language' => 'French (Swiss)', 'locale' => 'fr_ch', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'), |
655 |
'fr-fr' => array('language' => 'French (France)', 'locale' => 'fr_fr', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr'), |
656 |
'fr-lu' => array('language' => 'French (Luxembourg)', 'locale' => 'fr_lu', 'localeFallback' => 'fra', 'charset' => 'utf-8', 'direction' => 'ltr') |
657 |
); |
658 |
$this->assertEquals($expected, $result); |
659 |
|
660 |
$result = $localize->catalog(array('ga')); |
661 |
$expected = array( |
662 |
'ga' => array('language' => 'Irish', 'locale' => 'gle', 'localeFallback' => 'gle', 'charset' => 'utf-8', 'direction' => 'ltr') |
663 |
); |
664 |
$this->assertEquals($expected, $result); |
665 |
|
666 |
$result = $localize->catalog(array('gd', 'gd-ie')); |
667 |
$expected = array( |
668 |
'gd' => array('language' => 'Gaelic (Scots)', 'locale' => 'gla', 'localeFallback' => 'gla', 'charset' => 'utf-8', 'direction' => 'ltr'), |
669 |
'gd-ie' => array('language' => 'Gaelic (Irish)', 'locale' => 'gd_ie', 'localeFallback' => 'gla', 'charset' => 'utf-8', 'direction' => 'ltr') |
670 |
); |
671 |
$this->assertEquals($expected, $result); |
672 |
|
673 |
$result = $localize->catalog(array('gl')); |
674 |
$expected = array( |
675 |
'gl' => array('language' => 'Galician', 'locale' => 'glg', 'localeFallback' => 'glg', 'charset' => 'utf-8', 'direction' => 'ltr') |
676 |
); |
677 |
$this->assertEquals($expected, $result); |
678 |
|
679 |
$result = $localize->catalog(array('he')); |
680 |
$expected = array( |
681 |
'he' => array('language' => 'Hebrew', 'locale' => 'heb', 'localeFallback' => 'heb', 'charset' => 'utf-8', 'direction' => 'rtl') |
682 |
); |
683 |
$this->assertEquals($expected, $result); |
684 |
|
685 |
$result = $localize->catalog(array('hi')); |
686 |
$expected = array( |
687 |
'hi' => array('language' => 'Hindi', 'locale' => 'hin', 'localeFallback' => 'hin', 'charset' => 'utf-8', 'direction' => 'ltr') |
688 |
); |
689 |
$this->assertEquals($expected, $result); |
690 |
|
691 |
$result = $localize->catalog(array('hr')); |
692 |
$expected = array( |
693 |
'hr' => array('language' => 'Croatian', 'locale' => 'hrv', 'localeFallback' => 'hrv', 'charset' => 'utf-8', 'direction' => 'ltr') |
694 |
); |
695 |
$this->assertEquals($expected, $result); |
696 |
|
697 |
$result = $localize->catalog(array('hu')); |
698 |
$expected = array( |
699 |
'hu' => array('language' => 'Hungarian', 'locale' => 'hun', 'localeFallback' => 'hun', 'charset' => 'utf-8', 'direction' => 'ltr') |
700 |
); |
701 |
$this->assertEquals($expected, $result); |
702 |
|
703 |
$result = $localize->catalog(array('hy')); |
704 |
$expected = array( |
705 |
'hy' => array('language' => 'Armenian - Armenia', 'locale' => 'hye', 'localeFallback' => 'hye', 'charset' => 'utf-8', 'direction' => 'ltr') |
706 |
); |
707 |
$this->assertEquals($expected, $result); |
708 |
|
709 |
$result = $localize->catalog(array('id')); |
710 |
$expected = array( |
711 |
'id' => array('language' => 'Indonesian', 'locale' => 'ind', 'localeFallback' => 'ind', 'charset' => 'utf-8', 'direction' => 'ltr'), |
712 |
); |
713 |
$this->assertEquals($expected, $result); |
714 |
|
715 |
$result = $localize->catalog(array('is')); |
716 |
$expected = array( |
717 |
'is' => array('language' => 'Icelandic', 'locale' => 'isl', 'localeFallback' => 'isl', 'charset' => 'utf-8', 'direction' => 'ltr') |
718 |
); |
719 |
$this->assertEquals($expected, $result); |
720 |
|
721 |
$result = $localize->catalog(array('it', 'it-ch')); |
722 |
$expected = array( |
723 |
'it' => array('language' => 'Italian', 'locale' => 'ita', 'localeFallback' => 'ita', 'charset' => 'utf-8', 'direction' => 'ltr'), |
724 |
'it-ch' => array('language' => 'Italian (Swiss) ', 'locale' => 'it_ch', 'localeFallback' => 'ita', 'charset' => 'utf-8', 'direction' => 'ltr') |
725 |
); |
726 |
$this->assertEquals($expected, $result); |
727 |
|
728 |
$result = $localize->catalog(array('ja')); |
729 |
$expected = array( |
730 |
'ja' => array('language' => 'Japanese', 'locale' => 'jpn', 'localeFallback' => 'jpn', 'charset' => 'utf-8', 'direction' => 'ltr') |
731 |
); |
732 |
$this->assertEquals($expected, $result); |
733 |
|
734 |
$result = $localize->catalog(array('kk')); |
735 |
$expected = array( |
736 |
'kk' => array('language' => 'Kazakh', 'locale' => 'kaz', 'localeFallback' => 'kaz', 'charset' => 'utf-8', 'direction' => 'ltr') |
737 |
); |
738 |
$this->assertEquals($expected, $result); |
739 |
|
740 |
$result = $localize->catalog(array('ko', 'ko-kp', 'ko-kr')); |
741 |
$expected = array( |
742 |
'ko' => array('language' => 'Korean', 'locale' => 'kor', 'localeFallback' => 'kor', 'charset' => 'kr', 'direction' => 'ltr'), |
743 |
'ko-kp' => array('language' => 'Korea (North)', 'locale' => 'ko_kp', 'localeFallback' => 'kor', 'charset' => 'kr', 'direction' => 'ltr'), |
744 |
'ko-kr' => array('language' => 'Korea (South)', 'locale' => 'ko_kr', 'localeFallback' => 'kor', 'charset' => 'kr', 'direction' => 'ltr') |
745 |
); |
746 |
$this->assertEquals($expected, $result); |
747 |
|
748 |
$result = $localize->catalog(array('koi8-r', 'ru', 'ru-mo')); |
749 |
$expected = array( |
750 |
'koi8-r' => array('language' => 'Russian', 'locale' => 'koi8_r', 'localeFallback' => 'rus', 'charset' => 'koi8-r', 'direction' => 'ltr'), |
751 |
'ru' => array('language' => 'Russian', 'locale' => 'rus', 'localeFallback' => 'rus', 'charset' => 'utf-8', 'direction' => 'ltr'), |
752 |
'ru-mo' => array('language' => 'Russian (Moldavia)', 'locale' => 'ru_mo', 'localeFallback' => 'rus', 'charset' => 'utf-8', 'direction' => 'ltr') |
753 |
); |
754 |
$this->assertEquals($expected, $result); |
755 |
|
756 |
$result = $localize->catalog(array('lt')); |
757 |
$expected = array( |
758 |
'lt' => array('language' => 'Lithuanian', 'locale' => 'lit', 'localeFallback' => 'lit', 'charset' => 'utf-8', 'direction' => 'ltr') |
759 |
); |
760 |
$this->assertEquals($expected, $result); |
761 |
|
762 |
$result = $localize->catalog(array('lv')); |
763 |
$expected = array( |
764 |
'lv' => array('language' => 'Latvian', 'locale' => 'lav', 'localeFallback' => 'lav', 'charset' => 'utf-8', 'direction' => 'ltr') |
765 |
); |
766 |
$this->assertEquals($expected, $result); |
767 |
|
768 |
$result = $localize->catalog(array('mk', 'mk-mk')); |
769 |
$expected = array( |
770 |
'mk' => array('language' => 'FYRO Macedonian', 'locale' => 'mkd', 'localeFallback' => 'mkd', 'charset' => 'utf-8', 'direction' => 'ltr'), |
771 |
'mk-mk' => array('language' => 'Macedonian', 'locale' => 'mk_mk', 'localeFallback' => 'mkd', 'charset' => 'utf-8', 'direction' => 'ltr') |
772 |
); |
773 |
$this->assertEquals($expected, $result); |
774 |
|
775 |
$result = $localize->catalog(array('ms')); |
776 |
$expected = array( |
777 |
'ms' => array('language' => 'Malaysian', 'locale' => 'msa', 'localeFallback' => 'msa', 'charset' => 'utf-8', 'direction' => 'ltr') |
778 |
); |
779 |
$this->assertEquals($expected, $result); |
780 |
|
781 |
$result = $localize->catalog(array('mt')); |
782 |
$expected = array( |
783 |
'mt' => array('language' => 'Maltese', 'locale' => 'mlt', 'localeFallback' => 'mlt', 'charset' => 'utf-8', 'direction' => 'ltr') |
784 |
); |
785 |
$this->assertEquals($expected, $result); |
786 |
|
787 |
$result = $localize->catalog(array('nl', 'nl-be')); |
788 |
$expected = array( |
789 |
'nl' => array('language' => 'Dutch (Standard)', 'locale' => 'nld', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr'), |
790 |
'nl-be' => array('language' => 'Dutch (Belgium)', 'locale' => 'nl_be', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr') |
791 |
); |
792 |
$this->assertEquals($expected, $result); |
793 |
|
794 |
$result = $localize->catalog('nl'); |
795 |
$expected = array('language' => 'Dutch (Standard)', 'locale' => 'nld', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr'); |
796 |
$this->assertEquals($expected, $result); |
797 |
|
798 |
$result = $localize->catalog('nld'); |
799 |
$expected = array('language' => 'Dutch (Standard)', 'locale' => 'nld', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr'); |
800 |
$this->assertEquals($expected, $result); |
801 |
|
802 |
$result = $localize->catalog('dut'); |
803 |
$expected = array('language' => 'Dutch (Standard)', 'locale' => 'nld', 'localeFallback' => 'nld', 'charset' => 'utf-8', 'direction' => 'ltr'); |
804 |
$this->assertEquals($expected, $result); |
805 |
|
806 |
$result = $localize->catalog(array('nb')); |
807 |
$expected = array( |
808 |
'nb' => array('language' => 'Norwegian Bokmal', 'locale' => 'nob', 'localeFallback' => 'nor', 'charset' => 'utf-8', 'direction' => 'ltr') |
809 |
); |
810 |
$this->assertEquals($expected, $result); |
811 |
|
812 |
$result = $localize->catalog(array('nn', 'no')); |
813 |
$expected = array( |
814 |
'nn' => array('language' => 'Norwegian Nynorsk', 'locale' => 'nno', 'localeFallback' => 'nor', 'charset' => 'utf-8', 'direction' => 'ltr'), |
815 |
'no' => array('language' => 'Norwegian', 'locale' => 'nor', 'localeFallback' => 'nor', 'charset' => 'utf-8', 'direction' => 'ltr') |
816 |
); |
817 |
$this->assertEquals($expected, $result); |
818 |
|
819 |
$result = $localize->catalog(array('pl')); |
820 |
$expected = array( |
821 |
'pl' => array('language' => 'Polish', 'locale' => 'pol', 'localeFallback' => 'pol', 'charset' => 'utf-8', 'direction' => 'ltr') |
822 |
); |
823 |
$this->assertEquals($expected, $result); |
824 |
|
825 |
$result = $localize->catalog(array('pt', 'pt-br')); |
826 |
$expected = array( |
827 |
'pt' => array('language' => 'Portuguese (Portugal)', 'locale' => 'por', 'localeFallback' => 'por', 'charset' => 'utf-8', 'direction' => 'ltr'), |
828 |
'pt-br' => array('language' => 'Portuguese (Brazil)', 'locale' => 'pt_br', 'localeFallback' => 'por', 'charset' => 'utf-8', 'direction' => 'ltr') |
829 |
); |
830 |
$this->assertEquals($expected, $result); |
831 |
|
832 |
$result = $localize->catalog(array('rm')); |
833 |
$expected = array( |
834 |
'rm' => array('language' => 'Rhaeto-Romanic', 'locale' => 'roh', 'localeFallback' => 'roh', 'charset' => 'utf-8', 'direction' => 'ltr') |
835 |
); |
836 |
$this->assertEquals($expected, $result); |
837 |
|
838 |
$result = $localize->catalog(array('ro', 'ro-mo')); |
839 |
$expected = array( |
840 |
'ro' => array('language' => 'Romanian', 'locale' => 'ron', 'localeFallback' => 'ron', 'charset' => 'utf-8', 'direction' => 'ltr'), |
841 |
'ro-mo' => array('language' => 'Romanian (Moldavia)', 'locale' => 'ro_mo', 'localeFallback' => 'ron', 'charset' => 'utf-8', 'direction' => 'ltr') |
842 |
); |
843 |
$this->assertEquals($expected, $result); |
844 |
|
845 |
$result = $localize->catalog(array('sb')); |
846 |
$expected = array( |
847 |
'sb' => array('language' => 'Sorbian', 'locale' => 'wen', 'localeFallback' => 'wen', 'charset' => 'utf-8', 'direction' => 'ltr') |
848 |
); |
849 |
$this->assertEquals($expected, $result); |
850 |
|
851 |
$result = $localize->catalog(array('sk')); |
852 |
$expected = array( |
853 |
'sk' => array('language' => 'Slovak', 'locale' => 'slk', 'localeFallback' => 'slk', 'charset' => 'utf-8', 'direction' => 'ltr') |
854 |
); |
855 |
$this->assertEquals($expected, $result); |
856 |
|
857 |
$result = $localize->catalog(array('sl')); |
858 |
$expected = array( |
859 |
'sl' => array('language' => 'Slovenian', 'locale' => 'slv', 'localeFallback' => 'slv', 'charset' => 'utf-8', 'direction' => 'ltr') |
860 |
); |
861 |
$this->assertEquals($expected, $result); |
862 |
|
863 |
$result = $localize->catalog(array('sq')); |
864 |
$expected = array( |
865 |
'sq' => array('language' => 'Albanian', 'locale' => 'sqi', 'localeFallback' => 'sqi', 'charset' => 'utf-8', 'direction' => 'ltr') |
866 |
); |
867 |
$this->assertEquals($expected, $result); |
868 |
|
869 |
$result = $localize->catalog(array('sr')); |
870 |
$expected = array( |
871 |
'sr' => array('language' => 'Serbian', 'locale' => 'srp', 'localeFallback' => 'srp', 'charset' => 'utf-8', 'direction' => 'ltr') |
872 |
); |
873 |
$this->assertEquals($expected, $result); |
874 |
|
875 |
$result = $localize->catalog(array('sv', 'sv-fi')); |
876 |
$expected = array( |
877 |
'sv' => array('language' => 'Swedish', 'locale' => 'swe', 'localeFallback' => 'swe', 'charset' => 'utf-8', 'direction' => 'ltr'), |
878 |
'sv-fi' => array('language' => 'Swedish (Finland)', 'locale' => 'sv_fi', 'localeFallback' => 'swe', 'charset' => 'utf-8', 'direction' => 'ltr') |
879 |
); |
880 |
$this->assertEquals($expected, $result); |
881 |
|
882 |
$result = $localize->catalog(array('se')); |
883 |
$expected = array( |
884 |
'se' => array('language' => 'Sami', 'locale' => 'sme', 'localeFallback' => 'sme', 'charset' => 'utf-8', 'direction' => 'ltr') |
885 |
); |
886 |
$this->assertEquals($expected, $result); |
887 |
|
888 |
$result = $localize->catalog(array('th')); |
889 |
$expected = array( |
890 |
'th' => array('language' => 'Thai', 'locale' => 'tha', 'localeFallback' => 'tha', 'charset' => 'utf-8', 'direction' => 'ltr') |
891 |
); |
892 |
$this->assertEquals($expected, $result); |
893 |
|
894 |
$result = $localize->catalog(array('tn')); |
895 |
$expected = array( |
896 |
'tn' => array('language' => 'Tswana', 'locale' => 'tsn', 'localeFallback' => 'tsn', 'charset' => 'utf-8', 'direction' => 'ltr') |
897 |
); |
898 |
$this->assertEquals($expected, $result); |
899 |
|
900 |
$result = $localize->catalog(array('tr')); |
901 |
$expected = array( |
902 |
'tr' => array('language' => 'Turkish', 'locale' => 'tur', 'localeFallback' => 'tur', 'charset' => 'utf-8', 'direction' => 'ltr') |
903 |
); |
904 |
$this->assertEquals($expected, $result); |
905 |
|
906 |
$result = $localize->catalog(array('ts')); |
907 |
$expected = array( |
908 |
'ts' => array('language' => 'Tsonga', 'locale' => 'tso', 'localeFallback' => 'tso', 'charset' => 'utf-8', 'direction' => 'ltr') |
909 |
); |
910 |
$this->assertEquals($expected, $result); |
911 |
|
912 |
$result = $localize->catalog(array('uk')); |
913 |
$expected = array( |
914 |
'uk' => array('language' => 'Ukrainian', 'locale' => 'ukr', 'localeFallback' => 'ukr', 'charset' => 'utf-8', 'direction' => 'ltr') |
915 |
); |
916 |
$this->assertEquals($expected, $result); |
917 |
|
918 |
$result = $localize->catalog(array('ur')); |
919 |
$expected = array( |
920 |
'ur' => array('language' => 'Urdu', 'locale' => 'urd', 'localeFallback' => 'urd', 'charset' => 'utf-8', 'direction' => 'rtl') |
921 |
); |
922 |
$this->assertEquals($expected, $result); |
923 |
|
924 |
$result = $localize->catalog(array('ve')); |
925 |
$expected = array( |
926 |
've' => array('language' => 'Venda', 'locale' => 'ven', 'localeFallback' => 'ven', 'charset' => 'utf-8', 'direction' => 'ltr') |
927 |
); |
928 |
$this->assertEquals($expected, $result); |
929 |
|
930 |
$result = $localize->catalog(array('vi')); |
931 |
$expected = array( |
932 |
'vi' => array('language' => 'Vietnamese', 'locale' => 'vie', 'localeFallback' => 'vie', 'charset' => 'utf-8', 'direction' => 'ltr') |
933 |
); |
934 |
$this->assertEquals($expected, $result); |
935 |
|
936 |
$result = $localize->catalog(array('cy')); |
937 |
$expected = array( |
938 |
'cy' => array('language' => 'Welsh', 'locale' => 'cym', 'localeFallback' => 'cym', 'charset' => 'utf-8', |
939 |
'direction' => 'ltr') |
940 |
); |
941 |
$this->assertEquals($expected, $result); |
942 |
|
943 |
$result = $localize->catalog(array('xh')); |
944 |
$expected = array( |
945 |
'xh' => array('language' => 'Xhosa', 'locale' => 'xho', 'localeFallback' => 'xho', 'charset' => 'utf-8', 'direction' => 'ltr') |
946 |
); |
947 |
$this->assertEquals($expected, $result); |
948 |
|
949 |
$result = $localize->catalog(array('yi')); |
950 |
$expected = array( |
951 |
'yi' => array('language' => 'Yiddish', 'locale' => 'yid', 'localeFallback' => 'yid', 'charset' => 'utf-8', 'direction' => 'ltr') |
952 |
); |
953 |
$this->assertEquals($expected, $result); |
954 |
|
955 |
$result = $localize->catalog(array('zh', 'zh-cn', 'zh-hk', 'zh-sg', 'zh-tw')); |
956 |
$expected = array( |
957 |
'zh' => array('language' => 'Chinese', 'locale' => 'zho', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr'), |
958 |
'zh-cn' => array('language' => 'Chinese (PRC)', 'locale' => 'zh_cn', 'localeFallback' => 'zho', 'charset' => 'GB2312', 'direction' => 'ltr'), |
959 |
'zh-hk' => array('language' => 'Chinese (Hong Kong)', 'locale' => 'zh_hk', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr'), |
960 |
'zh-sg' => array('language' => 'Chinese (Singapore)', 'locale' => 'zh_sg', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr'), |
961 |
'zh-tw' => array('language' => 'Chinese (Taiwan)', 'locale' => 'zh_tw', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr') |
962 |
); |
963 |
$this->assertEquals($expected, $result); |
964 |
|
965 |
$result = $localize->catalog(array('zu')); |
966 |
$expected = array( |
967 |
'zu' => array('language' => 'Zulu', 'locale' => 'zul', 'localeFallback' => 'zul', 'charset' => 'utf-8', 'direction' => 'ltr') |
968 |
); |
969 |
$this->assertEquals($expected, $result); |
970 |
|
971 |
$result = $localize->catalog(array('en-nz', 'es-do', 'ar-lb', 'zh-hk', 'pt-br')); |
972 |
$expected = array( |
973 |
'en-nz' => array('language' => 'English (New Zealand)', 'locale' => 'en_nz', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), |
974 |
'es-do' => array('language' => 'Spanish (Dominican Republic)', 'locale' => 'es_do', 'localeFallback' => 'spa', 'charset' => 'utf-8', 'direction' => 'ltr'), |
975 |
'ar-lb' => array('language' => 'Arabic (Lebanon)', 'locale' => 'ar_lb', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), |
976 |
'zh-hk' => array('language' => 'Chinese (Hong Kong)', 'locale' => 'zh_hk', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr'), |
977 |
'pt-br' => array('language' => 'Portuguese (Brazil)', 'locale' => 'pt_br', 'localeFallback' => 'por', 'charset' => 'utf-8', 'direction' => 'ltr') |
978 |
); |
979 |
$this->assertEquals($expected, $result); |
980 |
|
981 |
$result = $localize->catalog(array('eng', 'deu', 'zho', 'rum', 'zul', 'yid')); |
982 |
$expected = array( |
983 |
'eng' => array('language' => 'English', 'locale' => 'eng', 'localeFallback' => 'eng', 'charset' => 'utf-8', 'direction' => 'ltr'), |
984 |
'deu' => array('language' => 'German (Standard)', 'locale' => 'deu', 'localeFallback' => 'deu', 'charset' => 'utf-8', 'direction' => 'ltr'), |
985 |
'zho' => array('language' => 'Chinese', 'locale' => 'zho', 'localeFallback' => 'zho', 'charset' => 'utf-8', 'direction' => 'ltr'), |
986 |
'rum' => array('language' => 'Romanian', 'locale' => 'ron', 'localeFallback' => 'ron', 'charset' => 'utf-8', 'direction' => 'ltr'), |
987 |
'zul' => array('language' => 'Zulu', 'locale' => 'zul', 'localeFallback' => 'zul', 'charset' => 'utf-8', 'direction' => 'ltr'), |
988 |
'yid' => array('language' => 'Yiddish', 'locale' => 'yid', 'localeFallback' => 'yid', 'charset' => 'utf-8', 'direction' => 'ltr') |
989 |
); |
990 |
$this->assertEquals($expected, $result); |
991 |
} |
992 |
} |