country name pairs. */ protected $countries; /** * Get an array of all two-letter country code => country name pairs. * * @return array * An array of country code => country name pairs. */ public static function getStandardList() { $countries = [ 'AC' => __('Ascension Island', 'wtotem'), 'AD' => __('Andorra', 'wtotem'), 'AE' => __('United Arab Emirates', 'wtotem'), 'AF' => __('Afghanistan', 'wtotem'), 'AG' => __('Antigua & Barbuda', 'wtotem'), 'AI' => __('Anguilla', 'wtotem'), 'AL' => __('Albania', 'wtotem'), 'AM' => __('Armenia', 'wtotem'), 'AN' => __('Netherlands Antilles', 'wtotem'), 'AO' => __('Angola', 'wtotem'), 'AQ' => __('Antarctica', 'wtotem'), 'AR' => __('Argentina', 'wtotem'), 'AS' => __('American Samoa', 'wtotem'), 'AT' => __('Austria', 'wtotem'), 'AU' => __('Australia', 'wtotem'), 'AW' => __('Aruba', 'wtotem'), 'AX' => __('Åland Islands', 'wtotem'), 'AZ' => __('Azerbaijan', 'wtotem'), 'BA' => __('Bosnia & Herzegovina', 'wtotem'), 'BB' => __('Barbados', 'wtotem'), 'BD' => __('Bangladesh', 'wtotem'), 'BE' => __('Belgium', 'wtotem'), 'BF' => __('Burkina Faso', 'wtotem'), 'BG' => __('Bulgaria', 'wtotem'), 'BH' => __('Bahrain', 'wtotem'), 'BI' => __('Burundi', 'wtotem'), 'BJ' => __('Benin', 'wtotem'), 'BL' => __('St. Barthélemy', 'wtotem'), 'BM' => __('Bermuda', 'wtotem'), 'BN' => __('Brunei', 'wtotem'), 'BO' => __('Bolivia', 'wtotem'), 'BQ' => __('Caribbean Netherlands', 'wtotem'), 'BR' => __('Brazil', 'wtotem'), 'BS' => __('Bahamas', 'wtotem'), 'BT' => __('Bhutan', 'wtotem'), 'BV' => __('Bouvet Island', 'wtotem'), 'BW' => __('Botswana', 'wtotem'), 'BY' => __('Belarus', 'wtotem'), 'BZ' => __('Belize', 'wtotem'), 'CA' => __('Canada', 'wtotem'), 'CC' => __('Cocos (Keeling) Islands', 'wtotem'), 'CD' => __('Congo - Kinshasa', 'wtotem'), 'CF' => __('Central African Republic', 'wtotem'), 'CG' => __('Congo - Brazzaville', 'wtotem'), 'CH' => __('Switzerland', 'wtotem'), 'CI' => __('Côte d’Ivoire', 'wtotem'), 'CK' => __('Cook Islands', 'wtotem'), 'CL' => __('Chile', 'wtotem'), 'CM' => __('Cameroon', 'wtotem'), 'CN' => __('China', 'wtotem'), 'CO' => __('Colombia', 'wtotem'), 'CP' => __('Clipperton Island', 'wtotem'), 'CR' => __('Costa Rica', 'wtotem'), 'CU' => __('Cuba', 'wtotem'), 'CV' => __('Cape Verde', 'wtotem'), 'CW' => __('Curaçao', 'wtotem'), 'CX' => __('Christmas Island', 'wtotem'), 'CY' => __('Cyprus', 'wtotem'), 'CZ' => __('Czechia', 'wtotem'), 'DE' => __('Germany', 'wtotem'), 'DG' => __('Diego Garcia', 'wtotem'), 'DJ' => __('Djibouti', 'wtotem'), 'DK' => __('Denmark', 'wtotem'), 'DM' => __('Dominica', 'wtotem'), 'DO' => __('Dominican Republic', 'wtotem'), 'DZ' => __('Algeria', 'wtotem'), 'EA' => __('Ceuta & Melilla', 'wtotem'), 'EC' => __('Ecuador', 'wtotem'), 'EE' => __('Estonia', 'wtotem'), 'EG' => __('Egypt', 'wtotem'), 'EH' => __('Western Sahara', 'wtotem'), 'ER' => __('Eritrea', 'wtotem'), 'ES' => __('Spain', 'wtotem'), 'ET' => __('Ethiopia', 'wtotem'), 'FI' => __('Finland', 'wtotem'), 'FJ' => __('Fiji', 'wtotem'), 'FK' => __('Falkland Islands', 'wtotem'), 'FM' => __('Micronesia', 'wtotem'), 'FO' => __('Faroe Islands', 'wtotem'), 'FR' => __('France', 'wtotem'), 'GA' => __('Gabon', 'wtotem'), 'GB' => __('United Kingdom', 'wtotem'), 'GD' => __('Grenada', 'wtotem'), 'GE' => __('Georgia', 'wtotem'), 'GF' => __('French Guiana', 'wtotem'), 'GG' => __('Guernsey', 'wtotem'), 'GH' => __('Ghana', 'wtotem'), 'GI' => __('Gibraltar', 'wtotem'), 'GL' => __('Greenland', 'wtotem'), 'GM' => __('Gambia', 'wtotem'), 'GN' => __('Guinea', 'wtotem'), 'GP' => __('Guadeloupe', 'wtotem'), 'GQ' => __('Equatorial Guinea', 'wtotem'), 'GR' => __('Greece', 'wtotem'), 'GS' => __('South Georgia & South Sandwich Islands', 'wtotem'), 'GT' => __('Guatemala', 'wtotem'), 'GU' => __('Guam', 'wtotem'), 'GW' => __('Guinea-Bissau', 'wtotem'), 'GY' => __('Guyana', 'wtotem'), 'HK' => __('Hong Kong SAR China', 'wtotem'), 'HM' => __('Heard & McDonald Islands', 'wtotem'), 'HN' => __('Honduras', 'wtotem'), 'HR' => __('Croatia', 'wtotem'), 'HT' => __('Haiti', 'wtotem'), 'HU' => __('Hungary', 'wtotem'), 'IC' => __('Canary Islands', 'wtotem'), 'ID' => __('Indonesia', 'wtotem'), 'IE' => __('Ireland', 'wtotem'), 'IL' => __('Israel', 'wtotem'), 'IM' => __('Isle of Man', 'wtotem'), 'IN' => __('India', 'wtotem'), 'IO' => __('British Indian Ocean Territory', 'wtotem'), 'IQ' => __('Iraq', 'wtotem'), 'IR' => __('Iran', 'wtotem'), 'IS' => __('Iceland', 'wtotem'), 'IT' => __('Italy', 'wtotem'), 'JE' => __('Jersey', 'wtotem'), 'JM' => __('Jamaica', 'wtotem'), 'JO' => __('Jordan', 'wtotem'), 'JP' => __('Japan', 'wtotem'), 'KE' => __('Kenya', 'wtotem'), 'KG' => __('Kyrgyzstan', 'wtotem'), 'KH' => __('Cambodia', 'wtotem'), 'KI' => __('Kiribati', 'wtotem'), 'KM' => __('Comoros', 'wtotem'), 'KN' => __('St. Kitts & Nevis', 'wtotem'), 'KP' => __('North Korea', 'wtotem'), 'KR' => __('South Korea', 'wtotem'), 'KW' => __('Kuwait', 'wtotem'), 'KY' => __('Cayman Islands', 'wtotem'), 'KZ' => __('Kazakhstan', 'wtotem'), 'LA' => __('Laos', 'wtotem'), 'LB' => __('Lebanon', 'wtotem'), 'LC' => __('St. Lucia', 'wtotem'), 'LI' => __('Liechtenstein', 'wtotem'), 'LK' => __('Sri Lanka', 'wtotem'), 'LR' => __('Liberia', 'wtotem'), 'LS' => __('Lesotho', 'wtotem'), 'LT' => __('Lithuania', 'wtotem'), 'LU' => __('Luxembourg', 'wtotem'), 'LV' => __('Latvia', 'wtotem'), 'LY' => __('Libya', 'wtotem'), 'MA' => __('Morocco', 'wtotem'), 'MC' => __('Monaco', 'wtotem'), 'MD' => __('Moldova', 'wtotem'), 'ME' => __('Montenegro', 'wtotem'), 'MF' => __('St. Martin', 'wtotem'), 'MG' => __('Madagascar', 'wtotem'), 'MH' => __('Marshall Islands', 'wtotem'), 'MK' => __('North Macedonia', 'wtotem'), 'ML' => __('Mali', 'wtotem'), 'MM' => __('Myanmar (Burma)', 'wtotem'), 'MN' => __('Mongolia', 'wtotem'), 'MO' => __('Macao SAR China', 'wtotem'), 'MP' => __('Northern Mariana Islands', 'wtotem'), 'MQ' => __('Martinique', 'wtotem'), 'MR' => __('Mauritania', 'wtotem'), 'MS' => __('Montserrat', 'wtotem'), 'MT' => __('Malta', 'wtotem'), 'MU' => __('Mauritius', 'wtotem'), 'MV' => __('Maldives', 'wtotem'), 'MW' => __('Malawi', 'wtotem'), 'MX' => __('Mexico', 'wtotem'), 'MY' => __('Malaysia', 'wtotem'), 'MZ' => __('Mozambique', 'wtotem'), 'NA' => __('Namibia', 'wtotem'), 'NC' => __('New Caledonia', 'wtotem'), 'NE' => __('Niger', 'wtotem'), 'NF' => __('Norfolk Island', 'wtotem'), 'NG' => __('Nigeria', 'wtotem'), 'NI' => __('Nicaragua', 'wtotem'), 'NL' => __('Netherlands', 'wtotem'), 'NO' => __('Norway', 'wtotem'), 'NP' => __('Nepal', 'wtotem'), 'NR' => __('Nauru', 'wtotem'), 'NU' => __('Niue', 'wtotem'), 'NZ' => __('New Zealand', 'wtotem'), 'OM' => __('Oman', 'wtotem'), 'PA' => __('Panama', 'wtotem'), 'PE' => __('Peru', 'wtotem'), 'PF' => __('French Polynesia', 'wtotem'), 'PG' => __('Papua New Guinea', 'wtotem'), 'PH' => __('Philippines', 'wtotem'), 'PK' => __('Pakistan', 'wtotem'), 'PL' => __('Poland', 'wtotem'), 'PM' => __('St. Pierre & Miquelon', 'wtotem'), 'PN' => __('Pitcairn Islands', 'wtotem'), 'PR' => __('Puerto Rico', 'wtotem'), 'PS' => __('Palestinian Territories', 'wtotem'), 'PT' => __('Portugal', 'wtotem'), 'PW' => __('Palau', 'wtotem'), 'PY' => __('Paraguay', 'wtotem'), 'QA' => __('Qatar', 'wtotem'), 'QO' => __('Outlying Oceania', 'wtotem'), 'RE' => __('Réunion', 'wtotem'), 'RO' => __('Romania', 'wtotem'), 'RS' => __('Serbia', 'wtotem'), 'RU' => __('Russia', 'wtotem'), 'RW' => __('Rwanda', 'wtotem'), 'SA' => __('Saudi Arabia', 'wtotem'), 'SB' => __('Solomon Islands', 'wtotem'), 'SC' => __('Seychelles', 'wtotem'), 'SD' => __('Sudan', 'wtotem'), 'SE' => __('Sweden', 'wtotem'), 'SG' => __('Singapore', 'wtotem'), 'SH' => __('St. Helena', 'wtotem'), 'SI' => __('Slovenia', 'wtotem'), 'SJ' => __('Svalbard & Jan Mayen', 'wtotem'), 'SK' => __('Slovakia', 'wtotem'), 'SL' => __('Sierra Leone', 'wtotem'), 'SM' => __('San Marino', 'wtotem'), 'SN' => __('Senegal', 'wtotem'), 'SO' => __('Somalia', 'wtotem'), 'SR' => __('Suriname', 'wtotem'), 'SS' => __('South Sudan', 'wtotem'), 'ST' => __('São Tomé & Príncipe', 'wtotem'), 'SV' => __('El Salvador', 'wtotem'), 'SX' => __('Sint Maarten', 'wtotem'), 'SY' => __('Syria', 'wtotem'), 'SZ' => __('Eswatini', 'wtotem'), 'TA' => __('Tristan da Cunha', 'wtotem'), 'TC' => __('Turks & Caicos Islands', 'wtotem'), 'TD' => __('Chad', 'wtotem'), 'TF' => __('French Southern Territories', 'wtotem'), 'TG' => __('Togo', 'wtotem'), 'TH' => __('Thailand', 'wtotem'), 'TJ' => __('Tajikistan', 'wtotem'), 'TK' => __('Tokelau', 'wtotem'), 'TL' => __('Timor-Leste', 'wtotem'), 'TM' => __('Turkmenistan', 'wtotem'), 'TN' => __('Tunisia', 'wtotem'), 'TO' => __('Tonga', 'wtotem'), 'TR' => __('Turkey', 'wtotem'), 'TT' => __('Trinidad & Tobago', 'wtotem'), 'TV' => __('Tuvalu', 'wtotem'), 'TW' => __('Taiwan', 'wtotem'), 'TZ' => __('Tanzania', 'wtotem'), 'UA' => __('Ukraine', 'wtotem'), 'UG' => __('Uganda', 'wtotem'), 'UM' => __('U.S. Outlying Islands', 'wtotem'), 'US' => __('United States', 'wtotem'), 'UY' => __('Uruguay', 'wtotem'), 'UZ' => __('Uzbekistan', 'wtotem'), 'VA' => __('Vatican City', 'wtotem'), 'VC' => __('St. Vincent & Grenadines', 'wtotem'), 'VE' => __('Venezuela', 'wtotem'), 'VG' => __('British Virgin Islands', 'wtotem'), 'VI' => __('U.S. Virgin Islands', 'wtotem'), 'VN' => __('Vietnam', 'wtotem'), 'VU' => __('Vanuatu', 'wtotem'), 'WF' => __('Wallis & Futuna', 'wtotem'), 'WS' => __('Samoa', 'wtotem'), 'XK' => __('Kosovo', 'wtotem'), 'YE' => __('Yemen', 'wtotem'), 'YT' => __('Mayotte', 'wtotem'), 'ZA' => __('South Africa', 'wtotem'), 'ZM' => __('Zambia', 'wtotem'), 'ZW' => __('Zimbabwe', 'wtotem'), ]; // Sort the list. natcasesort($countries); return $countries; } /** * Get an array of country code => country name pairs, altered by alter hooks. * * @return array * An array of country code => country name pairs. * */ public function getList() { // Populate the country list if it is not already populated. if (!isset($this->countries)) { $this->countries = static::getStandardList(); } return $this->countries; } }