? .csv_to_associativearray.php.swp
? countryInfo.csv
? csv_to_associativearray.php
? location_addanother.patch
? location_foreach_problem.alternate.patch
? location_foreach_problem.patch
? location_iso3166update.patch
? location_plurals.patch
? location_searchpermission.patch
? missingfiles.php
Index: location.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/location/location.inc,v
retrieving revision 1.34.2.10
diff -u -p -r1.34.2.10 location.inc
--- location.inc	5 Jan 2007 02:34:23 -0000	1.34.2.10
+++ location.inc	1 Feb 2007 13:48:11 -0000
@@ -1451,252 +1451,255 @@ function location_get_iso3166_list() {
 }
 
 // The following is an array of all countrycode => country-name pairs as layed out in
-// ISO 3166-1 alpha-2
+// ISO 3166 alpha-2. Based on list at http://download.geonames.org/export/dump/countryInfo.txt
 function _location_get_iso3166_list() {
-  return array('ad' => 'Andorra',
-               'ac' => 'Ascension Island',
-               'ae' => 'United Arab Emirates',
-               'af' => 'Afghanistan',
-               'ag' => 'Antigua and Barbuda',
-               'ai' => 'Anguilla',
-               'al' => 'Albania',
-               'am' => 'Armenia',
-               'an' => 'Netherlands Antilles',
-               'ao' => 'Angola',
-               'aq' => 'Antarctica',
-               'ar' => 'Argentina',
-               'as' => 'American Samoa',
-               'at' => 'Austria',
-               'au' => 'Australia',
-               'aw' => 'Aruba',
-               'ax' => 'Aland Islands',
-               'az' => 'Azerbaijan',
-               'ba' => 'Bosnia and Herzegovina',
-               'bb' => 'Barbados',
-               'bd' => 'Bangladesh',
-               'be' => 'Belgium',
-               'bf' => 'Burkina Faso',
-               'bg' => 'Bulgaria',
-               'bh' => 'Bahrain',
-               'bi' => 'Burundi',
-               'bj' => 'Benin',
-               'bm' => 'Bermuda',
-               'bn' => 'Brunei Darussalam',
-               'bo' => 'Bolivia',
-               'br' => 'Brazil',
-               'bs' => 'Bahamas',
-               'bt' => 'Bhutan',
-               'bv' => 'Bouvet Island',
-               'bw' => 'Botswana',
-               'by' => 'Belarus',
-               'bz' => 'Belize',
-               'ca' => 'Canada',
-               'cc' => 'Cocos (Keeling) Islands',
-               'cd' => 'Democratic Republic of the Congo (formerly Zaire)',
-               'cf' => 'Central African Republic',
-               'cg' => 'Congo (Republic of the Congo)',
-               'ch' => 'Switzerland (Confoederatio Helvetica)',
-               'ci' => 'Cote d\'Ivoire (Ivory Coast)',
-               'ck' => 'Cook Islands',
-               'cl' => 'Chile',
-               'cm' => 'Cameroon',
-               'cn' => 'China',
-               'co' => 'Colombia',
-               'cr' => 'Costa Rica',
-               'cs' => 'Serbia and Montenegro',
-               'cu' => 'Cuba',
-               'cv' => 'Cape Verde',
-               'cx' => 'Christmas Island',
-               'cy' => 'Cyprus',
-               'cz' => 'Czech Republic',
-               'de' => 'Germany (Deutschland)',
-               'dj' => 'Djibouti',
-               'dk' => 'Denmark',
-               'dm' => 'Dominica',
-               'do' => 'Dominican Republic',
-               'dz' => 'Algeria',
-               'ec' => 'Ecuador',
-               'ee' => 'Estonia',
-               'eg' => 'Egypt',
-               'eh' => 'Western Sahara (formerly Spanish Sahara)',
-               'er' => 'Eritrea',
-               'es' => 'Spain (Espana)',
-               'et' => 'Ethiopia',
-               'fi' => 'Finland',
-               'fj' => 'Fiji',
-               'fk' => 'Falkland Islands',
-               'fm' => 'Federated States of Micronesia',
-               'fo' => 'Faroe Islands',
-               'fr' => 'France',
-               'ga' => 'Gabon',
-               //'gb' => 'United Kingdom',
-               'gd' => 'Grenada',
-               'ge' => 'Georgia',
-               'gf' => 'French Guiana',
-               'gh' => 'Ghana',
-               'gi' => 'Gibraltar',
-               'gl' => 'Greenland',
-               'gm' => 'Gambia',
-               'gn' => 'Guinea',
-               'gp' => 'Guadeloupe',
-               'gq' => 'Equatorial Guinea',
-               'gr' => 'Greece',
-               'gs' => 'South Georgia and the South Sandwich Islands',
-               'gt' => 'Guatemala',
-               'gu' => 'Guam',
-               'gw' => 'Guinea-Bissau',
-               'gy' => 'Guyana',
-               'hk' => 'Hong Kong',
-               'hm' => 'Heard Island and McDonald Islands',
-               'hn' => 'Honduras',
-               'hr' => 'Croatia (Hrvatska)',
-               'ht' => 'Haiti',
-               'hu' => 'Hungary',
-               'id' => 'Indonesia',
-               'ie' => 'Ireland',
-               'il' => 'Israel',
-               'in' => 'India',
-               'io' => 'British Indian Ocean Territory (including Diego Garcia)',
-               'iq' => 'Iraq',
-               'ir' => 'Iran',
-               'is' => 'Iceland',
-               'it' => 'Italy',
-               'jm' => 'Jamaica',
-               'jo' => 'Jordan',
-               'jp' => 'Japan',
-               'ke' => 'Kenya',
-               'kg' => 'Kyrgyzstan',
-               'kh' => 'Cambodia',
-               'ki' => 'Kiribati',
-               'km' => 'Comoros',
-               'kn' => 'Saint Kitts and Nevis',
-               'kp' => 'North Korea',
-               'kr' => 'South Korea',
-               'kw' => 'Kuwait',
-               'ky' => 'Cayman Islands',
-               'kz' => 'Kazakhstan',
-               'la' => 'Laos',
-               'lb' => 'Lebanon',
-               'lc' => 'Saint Lucia',
-               'li' => 'Liechtenstein',
-               'lk' => 'Sri Lanka',
-               'lr' => 'Liberia',
-               'ls' => 'Lesotho',
-               'lt' => 'Lithuania',
-               'lu' => 'Luxembourg',
-               'lv' => 'Latvia',
-               'ly' => 'Libya',
-               'ma' => 'Morocco',
-               'mc' => 'Monaco',
-               'md' => 'Moldova',
-               'mg' => 'Madagascar',
-               'mh' => 'Marshall Islands',
-               'mk' => 'Former Yugoslav Republic of Macedonia',
-               'ml' => 'Mali',
-               'mm' => 'Myanmar (Burma)',
-               'mn' => 'Mongolia',
-               'mo' => 'Macao (Macau)',
-               'mp' => 'Northern Mariana Islands',
-               'mq' => 'Martinique',
-               'mr' => 'Mauritania',
-               'ms' => 'Montserrat',
-               'mt' => 'Malta',
-               'mu' => 'Mauritius',
-               'mv' => 'Maldives',
-               'mw' => 'Malawi',
-               'mx' => 'Mexico',
-               'my' => 'Malaysia',
-               'mz' => 'Mozambique',
-               'na' => 'Namibia',
-               'nc' => 'New Caledonia',
-               'ne' => 'Niger',
-               'nf' => 'Norfolk Island',
-               'ng' => 'Nigeria',
-               'ni' => 'Nicaragua',
-               'nl' => 'Netherlands',
-               'no' => 'Norway',
-               'np' => 'Nepal',
-               'nr' => 'Nauru',
-               'nu' => 'Niue',
-               'nz' => 'New Zealand',
-               'om' => 'Oman',
-               'pa' => 'Panama',
-               'pe' => 'Peru',
-               'pf' => 'French Polynesia',
-               'pg' => 'Papua New Guinea',
-               'ph' => 'Philippines',
-               'pk' => 'Pakistan',
-               'pl' => 'Poland',
-               'pm' => 'Saint-Pierre and Miquelon',
-               'pn' => 'Pitcairn Islands',
-               'pr' => 'Puerto Rico',
-               'ps' => 'Palestinian Territories (West Bank and Gaza Strip)',
-               'pt' => 'Portugal',
-               'pw' => 'Palau',
-               'py' => 'Paraguay',
-               'qa' => 'Qatar',
-               're' => 'Reunion',
-               'ro' => 'Romania',
-               'ru' => 'Russia',
-               'rw' => 'Rwanda',
-               'sa' => 'Saudi Arabia',
-               'sb' => 'Solomon Islands',
-               'sc' => 'Seychelles',
-               'sd' => 'Sudan',
-               'se' => 'Sweden',
-               'sg' => 'Singapore',
-               'sh' => 'Saint Helena',
-               'si' => 'Slovenia',
-               'sj' => 'Svalbard and Jan Mayen Islands',
-               'sk' => 'Slovakia',
-               'sl' => 'Sierra Leone',
-               'sm' => 'San Marino',
-               'sn' => 'Senegal',
-               'so' => 'Somalia',
-               'sr' => 'Suriname',
-               'st' => 'Sao Tome and Principe',
-               'sv' => 'El Salvador',
-               'sw' => 'Sweden',
-               'sy' => 'Syria',
-               'sz' => 'Swaziland',
-               'tc' => 'Turks and Caicos Islands',
-               'td' => 'Chad (Tchad)',
-               'tf' => 'French Southern Territories',
-               'tg' => 'Togo',
-               'th' => 'Thailand',
-               'tj' => 'Tajikistan',
-               'tk' => 'Tokelau',
-               'tl' => 'Timor-Leste (East Timor)',
-               'tm' => 'Turkmenistan',
-               'tn' => 'Tunisia',
-               'to' => 'Tonga',
-               'tr' => 'Turkey',
-               'tt' => 'Trinidad and Tobago',
-               'tv' => 'Tuvalu',
-               'tw' => 'Taiwan',
-               'tz' => 'Tanzania',
-               'ua' => 'Ukraine',
-               'ug' => 'Uganda',
-               'uk' => 'United Kingdom',
-               'um' => 'United States Minor Outlying Islands',
-               'us' => 'United States',
-               'uy' => 'Uruguay',
-               'uz' => 'Uzbekistan',
-               'va' => 'Vatican City',
-               'vc' => 'Saint Vincent and the Grenadines',
-               've' => 'Venezuela',
-               'vg' => 'British Virgin Islands',
-               'vi' => 'U.S. Virgin Islands',
-               'vn' => 'Vietnam',
-               'vu' => 'Vanuatu',
-               'wf' => 'Wallis and Futuna',
-               'ws' => 'Samoa',
-               'ye' => 'Yemen',
-               'yt' => 'Mayotte',
-               'za' => 'South Africa',
-               'zm' => 'Zambia',
-               'zw' => 'Zimbabwe'
-              );
+  return array(
+    "ad" => "Andorra",
+    "af" => "Afghanistan",
+    "ax" => "Aland Islands",
+    "al" => "Albania",
+    "dz" => "Algeria",
+    "as" => "American Samoa",
+    "ao" => "Angola",
+    "ai" => "Anguilla",
+    "aq" => "Antarctica",
+    "ag" => "Antigua and Barbuda",
+    "ar" => "Argentina",
+    "am" => "Armenia",
+    "aw" => "Aruba",
+    "au" => "Australia",
+    "at" => "Austria",
+    "az" => "Azerbaijan",
+    "bs" => "Bahamas",
+    "bh" => "Bahrain",
+    "bd" => "Bangladesh",
+    "bb" => "Barbados",
+    "by" => "Belarus",
+    "be" => "Belgium",
+    "bz" => "Belize",
+    "bj" => "Benin",
+    "bm" => "Bermuda",
+    "bt" => "Bhutan",
+    "bo" => "Bolivia",
+    "ba" => "Bosnia and Herzegovina",
+    "bw" => "Botswana",
+    "bv" => "Bouvet Island",
+    "br" => "Brazil",
+    "io" => "British Indian Ocean Territory",
+    "vg" => "British Virgin Islands",
+    "bn" => "Brunei",
+    "bg" => "Bulgaria",
+    "bf" => "Burkina Faso",
+    "bi" => "Burundi",
+    "kh" => "Cambodia",
+    "cm" => "Cameroon",
+    "ca" => "Canada",
+    "cv" => "Cape Verde",
+    "ky" => "Cayman Islands",
+    "cf" => "Central African Republic",
+    "td" => "Chad",
+    "cl" => "Chile",
+    "cn" => "China",
+    "cx" => "Christmas Island",
+    "cc" => "Cocos (Keeling) Islands",
+    "co" => "Colombia",
+    "km" => "Comoros",
+    "cg" => "Congo (Brazzaville)",
+    "cd" => "Congo (Kinshasa)",
+    "ck" => "Cook Islands",
+    "cr" => "Costa Rica",
+    "hr" => "Croatia",
+    "cu" => "Cuba",
+    "cy" => "Cyprus",
+    "cz" => "Czech Republic",
+    "dk" => "Denmark",
+    "dj" => "Djibouti",
+    "dm" => "Dominica",
+    "do" => "Dominican Republic",
+    "tl" => "East Timor",
+    "ec" => "Ecuador",
+    "eg" => "Egypt",
+    "sv" => "El Salvador",
+    "gq" => "Equatorial Guinea",
+    "er" => "Eritrea",
+    "ee" => "Estonia",
+    "et" => "Ethiopia",
+    "fk" => "Falkland Islands",
+    "fo" => "Faroe Islands",
+    "fj" => "Fiji",
+    "fi" => "Finland",
+    "fr" => "France",
+    "gf" => "French Guiana",
+    "pf" => "French Polynesia",
+    "tf" => "French Southern Territories",
+    "ga" => "Gabon",
+    "gm" => "Gambia",
+    "ge" => "Georgia",
+    "de" => "Germany",
+    "gh" => "Ghana",
+    "gi" => "Gibraltar",
+    "gr" => "Greece",
+    "gl" => "Greenland",
+    "gd" => "Grenada",
+    "gp" => "Guadeloupe",
+    "gu" => "Guam",
+    "gt" => "Guatemala",
+    "gg" => "Guernsey",
+    "gn" => "Guinea",
+    "gw" => "Guinea-Bissau",
+    "gy" => "Guyana",
+    "ht" => "Haiti",
+    "hm" => "Heard Island and McDonald Islands",
+    "hn" => "Honduras",
+    "hk" => "Hong Kong S.A.R., China",
+    "hu" => "Hungary",
+    "is" => "Iceland",
+    "in" => "India",
+    "id" => "Indonesia",
+    "ir" => "Iran",
+    "iq" => "Iraq",
+    "ie" => "Ireland",
+    "im" => "Isle of Man",
+    "il" => "Israel",
+    "it" => "Italy",
+    "ci" => "Ivory Coast",
+    "jm" => "Jamaica",
+    "jp" => "Japan",
+    "je" => "Jersey",
+    "jo" => "Jordan",
+    "kz" => "Kazakhstan",
+    "ke" => "Kenya",
+    "ki" => "Kiribati",
+    "kw" => "Kuwait",
+    "kg" => "Kyrgyzstan",
+    "la" => "Laos",
+    "lv" => "Latvia",
+    "lb" => "Lebanon",
+    "ls" => "Lesotho",
+    "lr" => "Liberia",
+    "ly" => "Libya",
+    "li" => "Liechtenstein",
+    "lt" => "Lithuania",
+    "lu" => "Luxembourg",
+    "mo" => "Macao S.A.R., China",
+    "mk" => "Macedonia",
+    "mg" => "Madagascar",
+    "mw" => "Malawi",
+    "my" => "Malaysia",
+    "mv" => "Maldives",
+    "ml" => "Mali",
+    "mt" => "Malta",
+    "mh" => "Marshall Islands",
+    "mq" => "Martinique",
+    "mr" => "Mauritania",
+    "mu" => "Mauritius",
+    "yt" => "Mayotte",
+    "mx" => "Mexico",
+    "fm" => "Micronesia",
+    "md" => "Moldova",
+    "mc" => "Monaco",
+    "mn" => "Mongolia",
+    "me" => "Montenegro",
+    "ms" => "Montserrat",
+    "ma" => "Morocco",
+    "mz" => "Mozambique",
+    "mm" => "Myanmar",
+    "na" => "Namibia",
+    "nr" => "Nauru",
+    "np" => "Nepal",
+    "nl" => "Netherlands",
+    "an" => "Netherlands Antilles",
+    "nc" => "New Caledonia",
+    "nz" => "New Zealand",
+    "ni" => "Nicaragua",
+    "ne" => "Niger",
+    "ng" => "Nigeria",
+    "nu" => "Niue",
+    "nf" => "Norfolk Island",
+    "kp" => "North Korea",
+    "mp" => "Northern Mariana Islands",
+    "no" => "Norway",
+    "om" => "Oman",
+    "pk" => "Pakistan",
+    "pw" => "Palau",
+    "ps" => "Palestinian Territory",
+    "pa" => "Panama",
+    "pg" => "Papua New Guinea",
+    "py" => "Paraguay",
+    "pe" => "Peru",
+    "ph" => "Philippines",
+    "pn" => "Pitcairn",
+    "pl" => "Poland",
+    "pt" => "Portugal",
+    "pr" => "Puerto Rico",
+    "qa" => "Qatar",
+    "re" => "Reunion",
+    "ro" => "Romania",
+    "ru" => "Russia",
+    "rw" => "Rwanda",
+    "sh" => "Saint Helena",
+    "kn" => "Saint Kitts and Nevis",
+    "lc" => "Saint Lucia",
+    "pm" => "Saint Pierre and Miquelon",
+    "vc" => "Saint Vincent and the Grenadines",
+    "ws" => "Samoa",
+    "sm" => "San Marino",
+    "st" => "Sao Tome and Principe",
+    "sa" => "Saudi Arabia",
+    "sn" => "Senegal",
+    "rs" => "Serbia",
+    "cs" => "Serbia And Montenegro",
+    "sc" => "Seychelles",
+    "sl" => "Sierra Leone",
+    "sg" => "Singapore",
+    "sk" => "Slovakia",
+    "si" => "Slovenia",
+    "sb" => "Solomon Islands",
+    "so" => "Somalia",
+    "za" => "South Africa",
+    "gs" => "South Georgia and the South Sandwich Islands",
+    "kr" => "South Korea",
+    "es" => "Spain",
+    "lk" => "Sri Lanka",
+    "sd" => "Sudan",
+    "sr" => "Suriname",
+    "sj" => "Svalbard and Jan Mayen",
+    "sz" => "Swaziland",
+    "se" => "Sweden",
+    "ch" => "Switzerland",
+    "sy" => "Syria",
+    "tw" => "Taiwan",
+    "tj" => "Tajikistan",
+    "tz" => "Tanzania",
+    "th" => "Thailand",
+    "tg" => "Togo",
+    "tk" => "Tokelau",
+    "to" => "Tonga",
+    "tt" => "Trinidad and Tobago",
+    "tn" => "Tunisia",
+    "tr" => "Turkey",
+    "tm" => "Turkmenistan",
+    "tc" => "Turks and Caicos Islands",
+    "tv" => "Tuvalu",
+    "vi" => "U.S. Virgin Islands",
+    "ug" => "Uganda",
+    "ua" => "Ukraine",
+    "ae" => "United Arab Emirates",
+    "uk" => "United Kingdom",  // NOTE: switched from gb
+    "us" => "United States",
+    "um" => "United States Minor Outlying Islands",
+    "uy" => "Uruguay",
+    "uz" => "Uzbekistan",
+    "vu" => "Vanuatu",
+    "va" => "Vatican",
+    "ve" => "Venezuela",
+    "vn" => "Vietnam",
+    "wf" => "Wallis and Futuna",
+    "eh" => "Western Sahara",
+    "ye" => "Yemen",
+    "zm" => "Zambia",
+    "zw" => "Zimbabwe",
+  );
 }
 
  
