r79380 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79379‎ | r79380 | r79381 >
Date:23:01, 31 December 2010
Author:kaldari
Status:deferred
Tags:
Comment:
new country stuff
Modified paths:
  • /trunk/extensions/ContributionTracking/countryCodes.inc (added) (history)

Diff [purge]

Index: trunk/extensions/ContributionTracking/countryCodes.inc
@@ -0,0 +1,254 @@
 2+<?php
 3+
 4+/**
 5+ * List of ISO numeric country codes to display as select menu to user
 6+ * needed to translate country to name-value pair 3-digit variable
 7+ */
 8+function countryCodes() {
 9+ $countryCode = array(
 10+ '840' => 'United States',
 11+ '124' => 'Canada',
 12+ '826' => 'United Kingdom',
 13+ '004' => 'Afghanistan',
 14+ '008' => 'Albania',
 15+ '012' => 'Algeria',
 16+ '016' => 'American Samoa',
 17+ '020' => 'Andorra',
 18+ '024' => 'Angola',
 19+ '660' => 'Anguilla',
 20+ '010' => 'Antarctica',
 21+ '028' => 'Antigua and Barbuda',
 22+ '032' => 'Argentina',
 23+ '051' => 'Armenia',
 24+ '533' => 'Aruba',
 25+ '036' => 'Australia',
 26+ '040' => 'Austria',
 27+ '031' => 'Azerbaijan',
 28+ '044' => 'Bahamas',
 29+ '048' => 'Bahrain',
 30+ '050' => 'Bangladesh',
 31+ '052' => 'Barbados',
 32+ '112' => 'Belarus',
 33+ '056' => 'Belgium',
 34+ '084' => 'Belize',
 35+ '204' => 'Benin',
 36+ '060' => 'Bermuda',
 37+ '064' => 'Bhutan',
 38+ '068' => 'Bolivia, Plurinational State of',
 39+ '070' => 'Bosnia and Herzegovina',
 40+ '072' => 'Botswana',
 41+ '074' => 'Bouvet Island',
 42+ '076' => 'Brazil',
 43+ '086' => 'British Indian Ocean Territory',
 44+ '096' => 'Brunei Darussalam',
 45+ '100' => 'Bulgaria',
 46+ '854' => 'Burkina Faso',
 47+ '108' => 'Burundi',
 48+ '116' => 'Cambodia',
 49+ '120' => 'Cameroon',
 50+ '124' => 'Canada',
 51+ '132' => 'Cape Verde',
 52+ '136' => 'Cayman Islands',
 53+ '140' => 'Central African Republic',
 54+ '148' => 'Chad',
 55+ '152' => 'Chile',
 56+ '156' => 'China',
 57+ '162' => 'Christmas Island',
 58+ '166' => 'Cocos (Keeling) Islands',
 59+ '017' => 'Colombia',
 60+ '174' => 'Comoros',
 61+ '178' => 'Congo',
 62+ '180' => 'Congo, the Democratic Republic of the',
 63+ '184' => 'Cook Islands',
 64+ '188' => 'Costa Rica',
 65+ '384' => "Cote D'Ivoire",
 66+ '191' => 'Croatia',
 67+ '192' => 'Cuba',
 68+ '196' => 'Cyprus',
 69+ '203' => 'Czech Republic',
 70+ '208' => 'Denmark',
 71+ '262' => 'Djibouti',
 72+ '212' => 'Dominica',
 73+ '214' => 'Dominican Republic',
 74+ '626' => 'East Timor',
 75+ '218' => 'Ecuador',
 76+ '818' => 'Egypt',
 77+ '222' => 'El Salvador',
 78+ '226' => 'Equatorial Guinea',
 79+ '232' => 'Eritrea',
 80+ '233' => 'Estonia',
 81+ '231' => 'Ethiopia',
 82+ '238' => 'Falkland Islands (Malvinas)',
 83+ '234' => 'Faroe Islands',
 84+ '242' => 'Fiji',
 85+ '246' => 'Finland',
 86+ '250' => 'France',
 87+ '254' => 'French Guiana',
 88+ '258' => 'French Polynesia',
 89+ '260' => 'French Southern Territories',
 90+ '266' => 'Gabon',
 91+ '270' => 'Gambia',
 92+ '268' => 'Georgia',
 93+ '276' => 'Germany',
 94+ '288' => 'Ghana',
 95+ '292' => 'Gibraltar',
 96+ '300' => 'Greece',
 97+ '304' => 'Greenland',
 98+ '308' => 'Grenada',
 99+ '312' => 'Guadeloupe',
 100+ '316' => 'Guam',
 101+ '320' => 'Guatemala',
 102+ '324' => 'Guinea',
 103+ '624' => 'Guinea-Bissau',
 104+ '328' => 'Guyana',
 105+ '332' => 'Haiti',
 106+ '334' => 'Heard Island and McDonald Islands',
 107+ '340' => 'Honduras',
 108+ '344' => 'Hong Kong',
 109+ '348' => 'Hungary',
 110+ '352' => 'Iceland',
 111+ '356' => 'India',
 112+ '360' => 'Indonesia',
 113+ '364' => 'Iran, Islamic Republic of',
 114+ '368' => 'Iraq',
 115+ '372' => 'Ireland',
 116+ '376' => 'Israel',
 117+ '380' => 'Italy',
 118+ '388' => 'Jamaica',
 119+ '392' => 'Japan',
 120+ '400' => 'Jordan',
 121+ '398' => 'Kazakhstan',
 122+ '404' => 'Kenya',
 123+ '296' => 'Kiribati',
 124+ '408' => "Korea, Democratic People's Republic of",
 125+ '410' => 'Korea, Republic of',
 126+ '414' => 'Kuwait',
 127+ '417' => 'Kyrgyzstan',
 128+ '418' => 'Laos',
 129+ '428' => 'Latvia',
 130+ '422' => 'Lebanon',
 131+ '426' => 'Lesotho',
 132+ '430' => 'Liberia',
 133+ '434' => 'Libyan Arab Jamahiriya',
 134+ '438' => 'Liechtenstein',
 135+ '440' => 'Lithuania',
 136+ '442' => 'Luxembourg',
 137+ '446' => 'Macao',
 138+ '807' => 'Macedonia',
 139+ '450' => 'Madagascar',
 140+ '454' => 'Malawi',
 141+ '458' => 'Malaysia',
 142+ '462' => 'Maldives',
 143+ '466' => 'Mali',
 144+ '470' => 'Malta',
 145+ '584' => 'Marshall Islands',
 146+ '474' => 'Martinique',
 147+ '478' => 'Mauritania',
 148+ '480' => 'Mauritius',
 149+ '175' => 'Mayotte',
 150+ '484' => 'Mexico',
 151+ '583' => 'Micronesia, Federated States of',
 152+ '498' => 'Moldova, Republic of',
 153+ '492' => 'Monaco',
 154+ '496' => 'Mongolia',
 155+ '499' => 'Montenegro',
 156+ '500' => 'Montserrat',
 157+ '504' => 'Morocco',
 158+ '508' => 'Mozambique',
 159+ '104' => 'Myanmar',
 160+ '516' => 'Namibia',
 161+ '520' => 'Nauru',
 162+ '524' => 'Nepal',
 163+ '528' => 'Netherlands',
 164+ '530' => 'Netherlands Antilles',
 165+ '540' => 'New Caledonia',
 166+ '554' => 'New Zealand',
 167+ '558' => 'Nicaragua',
 168+ '562' => 'Niger',
 169+ '566' => 'Nigeria',
 170+ '570' => 'Niue',
 171+ '574' => 'Norfolk Island',
 172+ '580' => 'Northern Mariana Islands',
 173+ '578' => 'Norway',
 174+ '512' => 'Oman',
 175+ '586' => 'Pakistan',
 176+ '585' => 'Palau',
 177+ '591' => 'Panama',
 178+ '598' => 'Papua New Guinea',
 179+ '600' => 'Paraguay',
 180+ '604' => 'Peru',
 181+ '608' => 'Philippines',
 182+ '612' => 'Pitcairn',
 183+ '616' => 'Poland',
 184+ '620' => 'Portugal',
 185+ '630' => 'Puerto Rico',
 186+ '634' => 'Qatar',
 187+ '642' => 'Romania',
 188+ '643' => 'Russian Federation',
 189+ '646' => 'Rwanda',
 190+ '659' => 'Saint Kitts and Nevis',
 191+ '662' => 'Saint Lucia',
 192+ '670' => 'Saint Vincent and the Grenadines',
 193+ '882' => 'Samoa',
 194+ '674' => 'San Marino',
 195+ '678' => 'Sao Tome and Principe',
 196+ '682' => 'Saudi Arabia',
 197+ '686' => 'Senegal',
 198+ '688' => 'Serbia',
 199+ '690' => 'Seychelles',
 200+ '694' => 'Sierra Leone',
 201+ '702' => 'Singapore',
 202+ '703' => 'Slovakia',
 203+ '705' => 'Slovenia',
 204+ '090' => 'Solomon Islands',
 205+ '706' => 'Somalia',
 206+ '710' => 'South Africa',
 207+ //'239' => 'South Georgia and the South Sandwich Islands',
 208+ '724' => 'Spain',
 209+ '144' => 'Sri Lanka',
 210+ '654' => 'Saint Helena',
 211+ '666' => 'Saint Pierre and Miquelon',
 212+ '736' => 'Sudan',
 213+ '740' => 'Suriname',
 214+ '744' => 'Svalbard and Jan Mayen',
 215+ '748' => 'Swaziland',
 216+ '752' => 'Sweden',
 217+ '756' => 'Switzerland',
 218+ '760' => 'Syrian Arab Republic',
 219+ '762' => 'Tajikistan',
 220+ '834' => 'Tanzania, United Republic of',
 221+ '158' => 'Taiwan',
 222+ '764' => 'Thailand',
 223+ '768' => 'Togo',
 224+ '772' => 'Tokelau',
 225+ '776' => 'Tonga',
 226+ '780' => 'Trinidad and Tobago',
 227+ '788' => 'Tunisia',
 228+ '792' => 'Turkey',
 229+ '795' => 'Turkmenistan',
 230+ '796' => 'Turks and Caicos Islands',
 231+ '798' => 'Tuvalu',
 232+ '800' => 'Uganda',
 233+ '804' => 'Ukraine',
 234+ '784' => 'United Arab Emirates',
 235+ '826' => 'United Kingdom',
 236+ '840' => 'United States',
 237+ '581' => 'United States Minor Outlying Islands',
 238+ '858' => 'Uruguay',
 239+ '860' => 'Uzbekistan',
 240+ '548' => 'Vanuatu',
 241+ '336' => 'Vatican City State',
 242+ '862' => 'Venezuela, Bolivarian Republic of',
 243+ '704' => 'Viet Nam',
 244+ '092' => 'Virgin Islands, British',
 245+ '850' => 'Virgin Islands, U.S.',
 246+ '876' => 'Wallis and Futuna',
 247+ '732' => 'Western Sahara',
 248+ '882' => 'Western Samoa',
 249+ '887' => 'Yemen',
 250+ '894' => 'Zambia',
 251+ '716' => 'Zimbabwe'
 252+ );
 253+
 254+ return $countryCode;
 255+}

Status & tagging log