pluf2

pluf2 Commit Details


Date:2009-07-10 16:13:50 (15 years 5 months ago)
Author:Loic d'Anterroches
Branch:master
Commit:129080c09e4acc90586ca5dc70159ef5407a0029
Parents: bbe7c75d75bc41e190f876a45e320d65c1523e4a
Message:Added a method to get the country codes.

Changes:

File differences

src/Pluf/L10n.php
380380
381381
382382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
383641
384642
385643
}
/**
* Get the country codes.
*
* @param Indexed by code (false)
* @return array English name indexed country code or reverse
*/
public static function getCountryCodes($idx_by_code=false)
{
$ctr = array(
'Andorra' => 'AD',
'United Arab Emirates' => 'AE',
'Afghanistan' => 'AF',
'Antigua & Barbuda' => 'AG',
'Anguilla' => 'AI',
'Albania' => 'AL',
'Armenia' => 'AM',
'Netherlands Antilles' => 'AN',
'Angola' => 'AO',
'Antarctica' => 'AQ',
'Argentina' => 'AR',
'American Samoa' => 'AS',
'Austria' => 'AT',
'Australia' => 'AU',
'Aruba' => 'AW',
'Azerbaijan' => 'AZ',
'Bosnia and Herzegovina' => 'BA',
'Barbados' => 'BB',
'Bangladesh' => 'BD',
'Belgium' => 'BE',
'Burkina Faso' => 'BF',
'Bulgaria' => 'BG',
'Bahrain' => 'BH',
'Burundi' => 'BI',
'Benin' => 'BJ',
'Bermuda' => 'BM',
'Brunei Darussalam' => 'BN',
'Bolivia' => 'BO',
'Brazil' => 'BR',
'Bahama' => 'BS',
'Bhutan' => 'BT',
'Bouvet Island' => 'BV',
'Botswana' => 'BW',
'Belarus' => 'BY',
'Belize' => 'BZ',
'Canada' => 'CA',
'Cocos (Keeling) Islands' => 'CC',
'Central African Republic' => 'CF',
'Congo' => 'CG',
'Switzerland' => 'CH',
'Côte D\'ivoire (Ivory Coast)' => 'CI',
'Cook Iislands' => 'CK',
'Chile' => 'CL',
'Cameroon' => 'CM',
'China' => 'CN',
'Colombia' => 'CO',
'Costa Rica' => 'CR',
'Cuba' => 'CU',
'Cape Verde' => 'CV',
'Christmas Island' => 'CX',
'Cyprus' => 'CY',
'Czech Republic' => 'CZ',
'Germany' => 'DE',
'Djibouti' => 'DJ',
'Denmark' => 'DK',
'Dominica' => 'DM',
'Dominican Republic' => 'DO',
'Algeria' => 'DZ',
'Ecuador' => 'EC',
'Estonia' => 'EE',
'Egypt' => 'EG',
'Western Sahara' => 'EH',
'Eritrea' => 'ER',
'Spain' => 'ES',
'Ethiopia' => 'ET',
'Finland' => 'FI',
'Fiji' => 'FJ',
'Falkland Islands (Malvinas)' => 'FK',
'Micronesia' => 'FM',
'Faroe Islands' => 'FO',
'France' => 'FR',
'France, Metropolitan' => 'FX',
'Gabon' => 'GA',
'United Kingdom (Great Britain)' => 'GB',
'Grenada' => 'GD',
'Georgia' => 'GE',
'French Guiana' => 'GF',
'Ghana' => 'GH',
'Gibraltar' => 'GI',
'Greenland' => 'GL',
'Gambia' => 'GM',
'Guinea' => 'GN',
'Guadeloupe' => 'GP',
'Equatorial Guinea' => 'GQ',
'Greece' => 'GR',
'South Georgia and the South Sandwich Islands' => 'GS',
'Guatemala' => 'GT',
'Guam' => 'GU',
'Guinea-Bissau' => 'GW',
'Guyana' => 'GY',
'Hong Kong' => 'HK',
'Heard & McDonald Islands' => 'HM',
'Honduras' => 'HN',
'Croatia' => 'HR',
'Haiti' => 'HT',
'Hungary' => 'HU',
'Indonesia' => 'ID',
'Ireland' => 'IE',
'Israel' => 'IL',
'India' => 'IN',
'British Indian Ocean Territory' => 'IO',
'Iraq' => 'IQ',
'Iran, Islamic Republic of' => 'IR',
'Iceland' => 'IS',
'Italy' => 'IT',
'Jamaica' => 'JM',
'Jordan' => 'JO',
'Japan' => 'JP',
'Kenya' => 'KE',
'Kyrgyzstan' => 'KG',
'Cambodia' => 'KH',
'Kiribati' => 'KI',
'Comoros' => 'KM',
'St. Kitts and Nevis' => 'KN',
'Korea, Democratic People\'s Republic of' => 'KP',
'Korea, Republic of' => 'KR',
'Kuwait' => 'KW',
'Cayman Islands' => 'KY',
'Kazakhstan' => 'KZ',
'Lao People\'s Democratic Republic' => 'LA',
'Lebanon' => 'LB',
'Saint Lucia' => 'LC',
'Liechtenstein' => 'LI',
'Sri Lanka' => 'LK',
'Liberia' => 'LR',
'Lesotho' => 'LS',
'Lithuania' => 'LT',
'Luxembourg' => 'LU',
'Latvia' => 'LV',
'Libyan Arab Jamahiriya' => 'LY',
'Morocco' => 'MA',
'Monaco' => 'MC',
'Moldova, Republic of' => 'MD',
'Montenegro' => 'ME',
'Madagascar' => 'MG',
'Marshall Islands' => 'MH',
'Macedonia, Republic of' => 'MK',
'Mali' => 'ML',
'Mongolia' => 'MN',
'Myanmar' => 'MM',
'Macau' => 'MO',
'Northern Mariana Islands' => 'MP',
'Martinique' => 'MQ',
'Mauritania' => 'MR',
'Monserrat' => 'MS',
'Malta' => 'MT',
'Mauritius' => 'MU',
'Maldives' => 'MV',
'Malawi' => 'MW',
'Mexico' => 'MX',
'Malaysia' => 'MY',
'Mozambique' => 'MZ',
'Namibia' => 'NA',
'New Caledonia' => 'NC',
'Niger' => 'NE',
'Norfolk Island' => 'NF',
'Nigeria' => 'NG',
'Nicaragua' => 'NI',
'Netherlands' => 'NL',
'Norway' => 'NO',
'Nepal' => 'NP',
'Nauru' => 'NR',
'Niue' => 'NU',
'New Zealand' => 'NZ',
'Oman' => 'OM',
'Panama' => 'PA',
'Peru' => 'PE',
'French Polynesia' => 'PF',
'Papua New Guinea' => 'PG',
'Philippines' => 'PH',
'Pakistan' => 'PK',
'Poland' => 'PL',
'St. Pierre & Miquelon' => 'PM',
'Pitcairn' => 'PN',
'Puerto Rico' => 'PR',
'Portugal' => 'PT',
'Palau' => 'PW',
'Paraguay' => 'PY',
'Qatar' => 'QA',
'Réunion' => 'RE',
'Romania' => 'RO',
'Serbia' => 'RS',
'Russian Federation' => 'RU',
'Rwanda' => 'RW',
'Saudi Arabia' => 'SA',
'Solomon Islands' => 'SB',
'Seychelles' => 'SC',
'Sudan' => 'SD',
'Sweden' => 'SE',
'Singapore' => 'SG',
'St. Helena' => 'SH',
'Slovenia' => 'SI',
'Svalbard & Jan Mayen Islands' => 'SJ',
'Slovakia' => 'SK',
'Sierra Leone' => 'SL',
'San Marino' => 'SM',
'Senegal' => 'SN',
'Somalia' => 'SO',
'Suriname' => 'SR',
'Sao Tome & Principe' => 'ST',
'El Salvador' => 'SV',
'Syrian Arab Republic' => 'SY',
'Swaziland' => 'SZ',
'Turks & Caicos Islands' => 'TC',
'Chad' => 'TD',
'French Southern Territories' => 'TF',
'Togo' => 'TG',
'Thailand' => 'TH',
'Tajikistan' => 'TJ',
'Tokelau' => 'TK',
'Turkmenistan' => 'TM',
'Tunisia' => 'TN',
'Tonga' => 'TO',
'East Timor' => 'TP',
'Turkey' => 'TR',
'Trinidad & Tobago' => 'TT',
'Tuvalu' => 'TV',
'Taiwan' => 'TW',
'Tanzania, United Republic of' => 'TZ',
'Ukraine' => 'UA',
'Uganda' => 'UG',
'United States Minor Outlying Islands' => 'UM',
'United States of America' => 'US',
'Uruguay' => 'UY',
'Uzbekistan' => 'UZ',
'Vatican City State (Holy See)' => 'VA',
'St. Vincent & the Grenadines' => 'VC',
'Venezuela' => 'VE',
'British Virgin Islands' => 'VG',
'United States Virgin Islands' => 'VI',
'Viet Nam' => 'VN',
'Vanuatu' => 'VU',
'Wallis & Futuna Islands' => 'WF',
'Samoa' => 'WS',
'Yemen' => 'YE',
'Mayotte' => 'YT',
'South Africa' => 'ZA',
'Zambia' => 'ZM',
'Zaire' => 'ZR',
'Zimbabwe' => 'ZW',
'Unknown or unspecified country' => 'ZZ'
);
if ($idx_by_code) {
$ctr = array_flip($ctr);
}
ksort($ctr);
return $ctr;
}
/**
* Returns iso codes.
*
* @param bool Is the language the key in the array (false)

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.06051s using 13 queries.