Skip to content

Instantly share code, notes, and snippets.

@gamerlv
Last active February 17, 2017 10:31
Show Gist options
  • Save gamerlv/267036993459bdb38e2be311414ced4a to your computer and use it in GitHub Desktop.
Save gamerlv/267036993459bdb38e2be311414ced4a to your computer and use it in GitHub Desktop.
<?php
// Mapping magento GTLD ; Emarsys country
$countries = array (
'AF' => 'Afghanistan',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AD' => 'Andorra',
'AO' => 'Angola',
'AG' => 'Antigua and Barbuda',
'AI' => 'Argentina',
'AR' => 'Armenia',
'AQ' => 'Australia',
'AM' => 'Austria',
'AZ' => 'Azerbaijan',
'AW' => 'Bahamas',
'AU' => 'Bahrain',
'BS' => 'Bangladesh',
'BH' => 'Barbados',
'AT' => 'Belarus',
'BY' => 'Belgium',
'BE' => 'Belize',
'BZ' => 'Benin',
'BB' => 'Bhutan',
'BJ' => 'Bolivia',
'BA' => 'Bosnia and Herzegovina',
'BM' => 'Botswana',
'BT' => 'Brazil',
'BN' => 'Brunei Darussalam',
'BO' => 'Bulgaria',
'BF' => 'Burkina Faso',
'BW' => 'Burma',
'BR' => 'Burundi',
'BG' => 'Cambodia',
'KH' => 'Cameroon',
'BD' => 'Canada',
'CV' => 'Cape Verde',
'CF' => 'Central African Republic',
'BI' => 'Chad',
'CA' => 'Chile',
'TD' => 'China',
'CN' => 'Colombia',
'CM' => 'Comoros',
'CL' => 'Congo',
'CO' => 'Costa Rica',
'CI' => 'Cote d’Ivoire',
'KM' => 'Croatia',
'CG' => 'Cuba',
'HR' => 'Cyprus',
'CZ' => 'Czech Republic',
'CU' => 'Denmark',
'DJ' => 'Djibouti',
'CR' => 'Dominica',
'DO' => 'Dominican Republic',
'CY' => 'Ecuador',
'DK' => 'Egypt',
'EC' => 'El Salvador',
'GQ' => 'Equatorial Guinea',
'DM' => 'Eritrea',
'EG' => 'Estonia',
'ER' => 'Ethiopia',
'EE' => 'Fiji',
'FJ' => 'Finland',
'FI' => 'France',
'FR' => 'Gabon',
'GM' => 'Gambia, The',
'ET' => 'Georgia',
'GA' => 'Germany',
'GE' => 'Ghana',
'DE' => 'Greece',
'GH' => 'Grenada',
'GD' => 'Guatemala',
'GR' => 'Guinea',
'GW' => 'Guinea-Bissau',
'GI' => 'Guyana',
'GU' => 'Haiti',
'HN' => 'Honduras',
'GG' => 'Hungary',
'GL' => 'Iceland',
'GN' => 'India',
'IN' => 'Indonesia',
'GY' => 'Iran',
'HT' => 'Iraq',
'HU' => 'Ireland',
'IS' => 'Israel',
'GT' => 'Italy',
'IQ' => 'Jamaica',
'IE' => 'Japan',
'IL' => 'Jordan',
'KZ' => 'Kazakhstan',
'IT' => 'Kenya',
'JO' => 'Kiribati',
'JM' => 'Kuwait',
'KG' => 'Kyrgyzstan',
'JP' => 'Laos',
'JE' => 'Latvia',
'KE' => 'Lebanon',
'KR' => 'Lesotho',
'ID' => 'Liberia',
'KI' => 'Libya',
'LI' => 'Liechtenstein',
'LV' => 'Lithuania',
'LU' => 'Luxembourg',
'LR' => 'Macedonia',
'MO' => 'Madagascar',
'KW' => 'Malawi',
'MK' => 'Malaysia',
'MW' => 'Maldives',
'LB' => 'Mali',
'LS' => 'Malta',
'AX' => 'Marshall Islands',
'LT' => 'Mauritania',
'MY' => 'Mauritius',
'MV' => 'Mexico',
'MR' => 'Micronesia',
'ML' => 'Moldova',
'HK' => 'Monaco',
'MT' => 'Mongolia',
'YT' => 'Morocco',
'MQ' => 'Mozambique',
'MG' => 'Myanmar',
'MU' => 'Namibia',
'MX' => 'Nauru',
'MC' => 'Nepal',
'NL' => 'The Netherlands',
'NZ' => 'New Zealand',
'NA' => 'Nicaragua',
'MM' => 'Niger',
'MD' => 'Nigeria',
'MN' => 'Norway',
'MA' => 'Oman',
'OM' => 'Pakistan',
'NR' => 'Palau',
'NP' => 'Panama',
'PG' => 'Papua New Guinea',
'NI' => 'Paraguay',
'NE' => 'Peru',
'PH' => 'Philippines',
'NU' => 'Poland',
'NO' => 'Portugal',
'NG' => 'Qatar',
'PW' => 'Romania',
'PK' => 'Russia',
'PA' => 'Rwanda',
'KN' => 'St. Kitts and Nevis',
'LC' => 'St. Lucia',
'PY' => 'Samoa',
'MF' => 'San Marino',
'ST' => 'São Tomé and Príncipe',
'SA' => 'Saudi Arabia',
'ME' => 'Senegal',
'PE' => 'Serbia',
'SC' => 'Seychelles',
'SL' => 'Sierra Leone',
'PN' => 'Singapore',
'PL' => 'Slovakia',
'RO' => 'Slovenia',
'RU' => 'Russian',
'KY' => 'Solomon Islands',
'PT' => 'Somalia',
'ZA' => 'South Africa',
'QA' => 'Spain',
'RE' => 'Sri Lanka',
'RW' => 'Sudan',
'WS' => 'Suriname',
'RS' => 'Swaziland',
'SN' => 'Sweden',
'SZ' => 'Switzerland',
'SK' => 'Syria',
'SO' => 'Taiwan',
'TW' => 'Tajikistan',
'SM' => 'Tanzania',
'ES' => 'Thailand',
'SD' => 'Togo',
'SG' => 'Tonga',
'TT' => 'Trinidad and Tobago',
'SI' => 'Tunisia',
'SR' => 'Turkey',
'TJ' => 'Turkmenistan',
'SE' => 'Tuvalu',
'LK' => 'Uganda',
'TH' => 'Ukraine',
'AE' => 'United Arab Emirates',
'GB' => 'United Kingdom',
'US' => 'United States of America',
'TG' => 'Uruguay',
'TM' => 'Uzbekistan',
'TZ' => 'Vanuatu',
'VU' => 'Venezuela',
'TK' => 'Vietnam',
'EH' => 'Western Sahara',
'TO' => 'Yemen',
'TN' => 'Yugoslavia',
'MZ' => 'Zaire',
'TR' => 'Zambia',
'UA' => 'Zimbabwe',
'CH' => 'Greenland',
'CK' => 'Virgin Islands',
'FO' => 'Canary Islands',
'MS' => 'Montenegro',
'AN' => 'Netherlands Antilles',
'TV' => 'Macau',
'UG' => 'Kosovo',
'AS' => 'American Samoa',
'BV' => 'Bouvet Island',
'IO' => 'British Indian Ocean Territory',
'CX' => 'Christmas Island',
'CC' => 'Cocos (Keeling) Islands',
'CD' => 'Congo, Democratic Republic',
'SV' => 'El Salvador',
'FK' => 'Falkland Islands (Malvinas)',
'GF' => 'France ',
'PF' => 'France',
'TF' => 'France',
'GP' => 'Guadeloupe',
'HM' => 'Heard Island & Mcdonald Islands',
'VA' => 'Holy See (Vatican City State)',
'IR' => 'Iran, Islamic Republic Of',
'IM' => 'United Kingdo',
'LA' => 'Lao People\'s Democratic Republic',
'LY' => 'Libyan Arab Jamahiriya',
'MH' => 'Marshall Islands',
'FM' => 'Micronesia, Federated States Of',
'NC' => 'New Caledonia',
'NF' => 'Norfolk Island',
'MP' => 'Northern Mariana Islands',
'PS' => 'Palestinian Territory, Occupied',
'PR' => 'Puerto Rico',
'BL' => 'Saint Barthelemy',
'SH' => 'Saint Helena',
'PM' => 'Saint Pierre And Miquelon',
'VC' => 'Saint Vincent And Grenadines',
'SB' => 'Solomon Islands',
'GS' => 'South Georgia And Sandwich Isl.',
'SJ' => 'Svalbard And Jan Mayen',
'SY' => 'Syrian Arab Republic',
'TL' => 'Timor-Leste',
'TC' => 'Turks And Caicos Islands',
'UM' => 'United States Outlying Islands',
'UY' => 'Uruguay',
'UZ' => 'Uzbekistan',
'VE' => 'Venezuela',
'VN' => 'Vietnam',
'VG' => 'Virgin Islands, British',
'VI' => 'Virgin Islands, U.S.',
'WF' => 'Wallis And Futuna',
'YE' => 'Yemen',
'ZM' => 'Zambia',
'ZW' => 'Zimbabwe',
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment