steffen: server/kolab-horde-framework/kolab-horde-framework/NLS/NLS GeoIP.php, NONE, 1.1 coordinates.php, NONE, 1.1 countries.php, NONE, 1.1 tld.php, NONE, 1.1
cvs at intevation.de
cvs at intevation.de
Fri Oct 14 16:33:10 CEST 2005
Author: steffen
Update of /kolabrepository/server/kolab-horde-framework/kolab-horde-framework/NLS/NLS
In directory doto:/tmp/cvs-serv28903/kolab-horde-framework/kolab-horde-framework/NLS/NLS
Added Files:
GeoIP.php coordinates.php countries.php tld.php
Log Message:
Separated Horde Framework from kolab-resource-handlers
--- NEW FILE: GeoIP.php ---
<?php
/**
* Horde optimized interface to the MaxMind IP Address->Country
* listing.
*
* $Horde: framework/NLS/NLS/GeoIP.php,v 1.9 2004/03/20 14:07:46 jan Exp $
*
* Based on PHP geoip.inc library by MaxMind LLC:
* http://www.maxmind.com/download/geoip/api/php/
*
* Originally based on php version of the geoip library written in May
* 2002 by jim winstead <jimw at apache.org>
*
* Copyright (C) 2003 MaxMind LLC
* Copyright 2003-2004 Michael Slusarz <slusarz at bigworm.colorado.edu>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* See the enclosed file COPYING for license information (GPL). If you
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*
* @author Michael Slusarz <slusarz at bigworm.colorado.edu>
* @version $Revision: 1.1 $
* @since Horde 3.0
* @package Horde_NLS
*/
/* Country list. */
$GLOBALS['GEOIP_COUNTRY_CODES'] = array(
'', 'AP', 'EU', 'AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AN', 'AO', 'AQ',
'AR', 'AS', 'AT', 'AU', 'AW', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH',
'BI', 'BJ', 'BM', 'BN', 'BO', 'BR', 'BS', 'BT', 'BV', 'BW', 'BY', 'BZ', 'CA',
'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CU',
'CV', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC', 'EE', 'EG',
'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR', 'FX', 'GA', 'UK',
'GD', 'GE', 'GF', 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT',
'GU', 'GW', 'GY', 'HK', 'HM', 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IN',
'IO', 'IQ', 'IR', 'IS', 'IT', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM',
'KN', 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS',
'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'MG', 'MH', 'MK', 'ML', 'MM', 'MN',
'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA',
'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM', 'PA',
'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR', 'PS', 'PT', 'PW', 'PY',
'QA', 'RE', 'RO', 'RU', 'RW', 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI',
'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'ST', 'SV', 'SY', 'SZ', 'TC', 'TD',
'TF', 'TG', 'TH', 'TJ', 'TK', 'TM', 'TN', 'TO', 'TP', 'TR', 'TT', 'TV', 'TW',
'TZ', 'UA', 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN',
'VU', 'WF', 'WS', 'YE', 'YT', 'YU', 'ZA', 'ZM', 'ZR', 'ZW', 'A1', 'A2', 'O1'
);
/* Country Names. */
$GLOBALS['GEOIP_COUNTRY_NAMES'] = array(
"", _("Asia/Pacific Region"), _("Europe"), _("Andorra"),
_("United Arab Emirates"), _("Afghanistan"), _("Antigua and Barbuda"),
_("Anguilla"), _("Albania"), _("Armenia"), _("Netherlands Antilles"),
_("Angola"), _("Antarctica"), _("Argentina"), _("American Samoa"),
_("Austria"), _("Australia"), _("Aruba"), _("Azerbaijan"),
_("Bosnia and Herzegovina"), _("Barbados"), _("Bangladesh"), _("Belgium"),
_("Burkina Faso"), _("Bulgaria"), _("Bahrain"), _("Burundi"), _("Benin"),
_("Bermuda"), _("Brunei Darussalam"), _("Bolivia"), _("Brazil"), _("Bahamas"),
_("Bhutan"), _("Bouvet Island"), _("Botswana"), _("Belarus"), _("Belize"),
_("Canada"), _("Cocos (Keeling) Islands"),
_("Congo, The Democratic Republic of the"), _("Central African Republic"),
_("Congo"), _("Switzerland"), _("Cote d'Ivoire"), _("Cook Islands"),
_("Chile"), _("Cameroon"), _("China"), _("Colombia"), _("Costa Rica"),
_("Cuba"), _("Cape Verde"), _("Christmas Island"), _("Cyprus"),
_("Czech Republic"), _("Germany"), _("Djibouti"), _("Denmark"), _("Dominica"),
_("Dominican Republic"), _("Algeria"), _("Ecuador"), _("Estonia"), _("Egypt"),
_("Western Sahara"), _("Eritrea"), _("Spain"), _("Ethiopia"), _("Finland"),
_("Fiji"), _("Falkland Islands (Malvinas)"), _("Micronesia, Federated States of"),
_("Faroe Islands"), _("France"), _("France, Metropolitan"), _("Gabon"),
_("United Kingdom"), _("Grenada"), _("Georgia"), _("French Guiana"),
_("Ghana"), _("Gibraltar"), _("Greenland"), _("Gambia"), _("Guinea"),
_("Guadeloupe"), _("Equatorial Guinea"), _("Greece"),
_("South Georgia and the South Sandwich Islands"), _("Guatemala"), _("Guam"),
_("Guinea-Bissau"), _("Guyana"), _("Hong Kong"),
_("Heard Island and McDonald Islands"), _("Honduras"), _("Croatia"),
_("Haiti"), _("Hungary"), _("Indonesia"), _("Ireland"), _("Israel"),
_("India"), _("British Indian Ocean Territory"), _("Iraq"),
_("Iran, Islamic Republic of"), _("Iceland"), _("Italy"), _("Jamaica"),
_("Jordan"), _("Japan"), _("Kenya"), _("Kyrgyzstan"), _("Cambodia"),
_("Kiribati"), _("Comoros"), _("Saint Kitts and Nevis"),
_("Korea, Democratic People's Republic of"), _("Korea, Republic of"),
_("Kuwait"), _("Cayman Islands"), _("Kazakhstan"),
_("Lao People's Democratic Republic"), _("Lebanon"), _("Saint Lucia"),
_("Liechtenstein"), _("Sri Lanka"), _("Liberia"), _("Lesotho"),
_("Lithuania"), _("Luxembourg"), _("Latvia"), _("Libyan Arab Jamahiriya"),
_("Morocco"), _("Monaco"), _("Moldova, Republic of"), _("Madagascar"),
_("Marshall Islands"), _("Macedonia, The Former Yugoslav Republic of"),
_("Mali"), _("Myanmar"), _("Mongolia"), _("Macao"),
_("Northern Mariana Islands"), _("Martinique"), _("Mauritania"),
_("Montserrat"), _("Malta"), _("Mauritius"), _("Maldives"), _("Malawi"),
_("Mexico"), _("Malaysia"), _("Mozambique"), _("Namibia"), _("New Caledonia"),
_("Niger"), _("Norfolk Island"), _("Nigeria"), _("Nicaragua"),
_("Netherlands"), _("Norway"), _("Nepal"), _("Nauru"), _("Niue"),
_("New Zealand"), _("Oman"), _("Panama"), _("Peru"), _("French Polynesia"),
_("Papua New Guinea"), _("Philippines"), _("Pakistan"), _("Poland"),
_("Saint Pierre and Miquelon"), _("Pitcairn"), _("Puerto Rico"),
_("Palestinian Territory, Occupied"), _("Portugal"), _("Palau"),
_("Paraguay"), _("Qatar"), _("Reunion"), _("Romania"),
_("Russian Federation"), _("Rwanda"), _("Saudi Arabia"), _("Solomon Islands"),
_("Seychelles"), _("Sudan"), _("Sweden"), _("Singapore"), _("Saint Helena"),
_("Slovenia"), _("Svalbard and Jan Mayen"), _("Slovakia"), _("Sierra Leone"),
_("San Marino"), _("Senegal"), _("Somalia"), _("Suriname"),
_("Sao Tome and Principe"), _("El Salvador"), _("Syrian Arab Republic"),
_("Swaziland"), _("Turks and Caicos Islands"), _("Chad"),
_("French Southern Territories"), _("Togo"), _("Thailand"), _("Tajikistan"),
_("Tokelau"), _("Turkmenistan"), _("Tunisia"), _("Tonga"), _("Timor-Leste"),
_("Turkey"), _("Trinidad and Tobago"), _("Tuvalu"), _("Taiwan"),
_("Tanzania, United Republic of"), _("Ukraine"), _("Uganda"),
_("United States Minor Outlying Islands"), _("United States"), _("Uruguay"),
_("Uzbekistan"), _("Holy See (Vatican City State)"),
_("Saint Vincent and the Grenadines"), _("Venezuela"),
_("Virgin Islands, British"), _("Virgin Islands, U.S."), _("Viet Nam"),
_("Vanuatu"), _("Wallis and Futuna"), _("Samoa"), _("Yemen"), _("Mayotte"),
_("Yugoslavia"), _("South Africa"), _("Zambia"), _("Zaire"), _("Zimbabwe"),
_("Anonymous Proxy"), _("Satellite Provider"), _("Other")
);
define('GEOIP_COUNTRY_BEGIN', 16776960);
define('STRUCTURE_INFO_MAX_SIZE', 20);
define('STANDARD_RECORD_LENGTH', 3);
class NLS_GeoIP {
/**
* The location of the GeoIP database.
*
* @var string $_datafile
*/
var $_datafile;
/**
* The open filehandle to the GeoIP database.
*
* @var resource $_filehandle
*/
var $_filehandle;
/**
* Returns a reference to the global NLS_GeoIP object, only creating it
* if it doesn't already exist.
*
* This method must be invoked as:
* $geoip = &GeoIP::singleton($datafile);
*
* @access public
*
* @param string $datafile The location of the GeoIP database.
*
* @return object NLS_GeoIP The NLS_GeoIP instance.
*/
function &singleton($datafile)
{
static $instance;
if (!isset($instance)) {
$instance = new NLS_GeoIP($datafile);
}
return $instance;
}
/**
* Create a NLS_GeoIP instance (Constructor).
*
* @access public
*
* @param string $datafile The location of the GeoIP database.
*/
function NLS_GeoIP($datafile)
{
$this->_datafile = $datafile;
}
/**
* Open the GeoIP database.
*
* @access private
*
* @return boolean False on error.
*/
function _open()
{
/* Return if we already have an object. */
if (!empty($this->_gi)) {
return true;
}
/* Return if no datafile specified. */
if (empty($this->_datafile)) {
return false;
}
$this->_filehandle = fopen($this->_datafile, 'rb');
$filepos = ftell($this->_filehandle);
fseek($this->_filehandle, -3, SEEK_END);
for ($i = 0; $i < STRUCTURE_INFO_MAX_SIZE; $i++) {
$delim = fread($this->_filehandle, 3);
if ($delim == (chr(255) . chr(255) . chr(255))) {
break;
} else {
fseek($this->_filehandle, -4, SEEK_CUR);
}
}
fseek($this->_filehandle, $filepos, SEEK_SET);
return true;
}
/**
* Returns the country ID for a hostname.
*
* @access public
*
* @param string $name The hostname.
*
* @return integer The GeoIP country ID.
*/
function countryIdByName($name)
{
if (!$this->_open()) {
return false;
}
$addr = gethostbyname($name);
if (!$addr || $addr == $name) {
return false;
}
return $this->countryIdByAddr($addr);
}
/**
* Returns the country abbreviation (2-letter) for a hostname.
*
* @access public
*
* @param string $name The hostname.
*
* @return integer The country abbreviation.
*/
function countryCodeByName($name)
{
if ($this->_open()) {
$country_id = $this->countryIdByName($name);
if ($country_id !== false) {
return $GLOBALS['GEOIP_COUNTRY_CODES'][$country_id];
}
}
return false;
}
/**
* Returns the country name for a hostname.
*
* @access public
*
* @param string $name The hostname.
*
* @return integer The country name.
*/
function countryNameByName($name)
{
if ($this->_open()) {
$country_id = $this->countryIdByName($name);
if ($country_id !== false) {
return $GLOBALS['GEOIP_COUNTRY_NAMES'][$country_id];
}
}
return false;
}
/**
* Returns the country ID for an IP Address.
*
* @access public
*
* @param string $addr The IP Address.
*
* @return integer The GeoIP country ID.
*/
function countryIdByAddr($addr)
{
if (!$this->_open()) {
return false;
}
$ipnum = ip2long($addr);
return ($this->_seekCountry($ipnum) - GEOIP_COUNTRY_BEGIN);
}
/**
* Returns the country abbreviation (2-letter) for an IP Address.
*
* @access public
*
* @param string $addr The IP Address.
*
* @return integer The country abbreviation.
*/
function countryCodeByAddr($addr)
{
if ($this->_open()) {
$country_id = $this->countryIdByAddr($addr);
if ($country_id !== false) {
return $GLOBALS['GEOIP_COUNTRY_CODES'][$country_id];
}
}
return false;
}
/**
* Returns the country name for an IP address.
*
* @access public
*
* @param string $addr The IP address.
*
* @return mixed The country name.
*/
function countryNameByAddr($addr)
{
if ($this->_open()) {
$country_id = $this->countryIdByAddr($addr);
if ($country_id !== false) {
return $GLOBALS['GEOIP_COUNTRY_NAMES'][$country_id];
}
}
return false;
}
/**
* Finds a country by IP Address in the GeoIP database.
*
* @access private
*
* @param string $ipnum The IP Address to search for.
*
* @return mixed The country ID or false if not found.
* Returns PEAR_Error on error.
*/
function _seekCountry($ipnum)
{
$offset = 0;
for ($depth = 31; $depth >= 0; --$depth) {
if (fseek($this->_filehandle, 2 * STANDARD_RECORD_LENGTH * $offset, SEEK_SET) != 0) {
return PEAR::raiseError('fseek failed');
}
$buf = fread($this->_filehandle, 2 * STANDARD_RECORD_LENGTH);
$x = array(0, 0);
for ($i = 0; $i < 2; ++$i) {
for ($j = 0; $j < STANDARD_RECORD_LENGTH; ++$j) {
$x[$i] += ord($buf[STANDARD_RECORD_LENGTH * $i + $j]) << ($j * 8);
}
}
if ($ipnum & (1 << $depth)) {
if ($x[1] >= GEOIP_COUNTRY_BEGIN) {
return $x[1];
}
$offset = $x[1];
} else {
if ($x[0] >= GEOIP_COUNTRY_BEGIN) {
return $x[0];
}
$offset = $x[0];
}
}
return false;
}
}
--- NEW FILE: coordinates.php ---
<?php
/**
* This file lists the locations of cities around the world. The
* format is:
*
* $coordinates['countryname']['lat:long'] = 'cityname';
*
* Latitude and longitude are decimals (south and west are negative).
*
* $Horde: framework/NLS/NLS/coordinates.php,v 1.2 2003/11/06 21:03:10 chuck Exp $
*
* @package Horde_NLS
*/
$coordinates['Afghanistan']['31.000:61.850'] = "Zaranj";
$coordinates['Afghanistan']['32.367:62.183'] = "Farah";
$coordinates['Afghanistan']['33.400:62.283'] = "Shindand";
$coordinates['Afghanistan']['34.217:62.217'] = "Herat";
$coordinates['Afghanistan']['34.433:70.467'] = "Jalalabad";
[...3863 lines suppressed...]
$coordinates['Zambia']['-16.833:27.067'] = "Choma";
$coordinates['Zambia']['-17.467:24.300'] = "Sesheke";
$coordinates['Zambia']['-17.817:25.817'] = "Livingstone";
$coordinates['Zambia']['-8.850:31.333'] = "Mbala";
$coordinates['Zambia']['-9.800:29.083'] = "Kawambwa";
$coordinates['Zimbabwe']['-16.517:28.883'] = "Kariba";
$coordinates['Zimbabwe']['-16.833:29.617'] = "Karoi";
$coordinates['Zimbabwe']['-17.417:32.217'] = "Mutoko";
$coordinates['Zimbabwe']['-17.617:27.333'] = "Binga";
$coordinates['Zimbabwe']['-17.917:31.133'] = "Harare Kutsaga";
$coordinates['Zimbabwe']['-18.100:25.850'] = "Victoria Falls";
$coordinates['Zimbabwe']['-18.217:28.933'] = "Gokwe";
$coordinates['Zimbabwe']['-18.533:32.133'] = "Rusape";
$coordinates['Zimbabwe']['-18.633:27.000'] = "Hwange National Park";
$coordinates['Zimbabwe']['-19.450:29.850'] = "Gweru";
$coordinates['Zimbabwe']['-20.017:28.617'] = "Bulawayo Airport";
$coordinates['Zimbabwe']['-20.067:30.867'] = "Masvingo";
$coordinates['Zimbabwe']['-20.200:32.617'] = "Chipinge";
$coordinates['Zimbabwe']['-21.017:31.583'] = "Buffalo Range";
$coordinates['Zimbabwe']['-22.217:30.000'] = "Beitbridge";
--- NEW FILE: countries.php ---
<?php
/**
* The ISO-3166 country list.
*
* $Horde: framework/NLS/NLS/countries.php,v 1.3 2004/03/20 14:07:46 jan Exp $
*
* @package Horde_NLS
*/
$countries = array(
'AF' => _("Afghanistan"),
'AL' => _("Albania"),
'DZ' => _("Algeria"),
'AS' => _("American Samoa"),
'AD' => _("Andorra"),
'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"),
'BN' => _("Brunei Darussalam"),
'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"),
'CD' => _("Congo, The Democratic Republic of the"),
'CK' => _("Cook Islands"),
'CR' => _("Costa Rica"),
'CI' => _("Cote d'Ivoire"),
'HR' => _("Croatia"),
'CU' => _("Cuba"),
'CY' => _("Cyprus"),
'CZ' => _("Czech Republic"),
'DK' => _("Denmark"),
'DJ' => _("Djibouti"),
'DM' => _("Dominica"),
'DO' => _("Dominican Republic"),
'EC' => _("Ecuador"),
'EG' => _("Egypt"),
'SV' => _("El Salvador"),
'GQ' => _("Equatorial Guinea"),
'ER' => _("Eritrea"),
'EE' => _("Estonia"),
'ET' => _("Ethiopia"),
'FK' => _("Falkland Islands (Malvinas)"),
'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"),
'GN' => _("Guinea"),
'GW' => _("Guinea-Bissau"),
'GY' => _("Guyana"),
'HT' => _("Haiti"),
'HM' => _("Heard Island and McDonald Islands"),
'VA' => _("Holy See (Vatican City State)"),
'HN' => _("Honduras"),
'HK' => _("Hong Kong"),
'HU' => _("Hungary"),
'IS' => _("Iceland"),
'IN' => _("India"),
'ID' => _("Indonesia"),
'IR' => _("Iran, Islamic Republic of"),
'IQ' => _("Iraq"),
'IE' => _("Ireland"),
'IL' => _("Israel"),
'IT' => _("Italy"),
'JM' => _("Jamaica"),
'JP' => _("Japan"),
'JO' => _("Jordan"),
'KZ' => _("Kazakhstan"),
'KE' => _("Kenya"),
'KI' => _("Kiribati"),
'KP' => _("Korea, Democratic People's Republic of"),
'KR' => _("Korea, Republic of"),
'KW' => _("Kuwait"),
'KG' => _("Kyrgyzstan"),
'LA' => _("Lao People's Democratic Republic"),
'LV' => _("Latvia"),
'LB' => _("Lebanon"),
'LS' => _("Lesotho"),
'LR' => _("Liberia"),
'LY' => _("Libyan Arab Jamahiriya"),
'LI' => _("Liechtenstein"),
'LT' => _("Lithuania"),
'LU' => _("Luxembourg"),
'MO' => _("Macao"),
'MK' => _("Macedonia, The Former Yugoslav Republic of"),
'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, Federated States of"),
'MD' => _("Moldova, Republic of"),
'MC' => _("Monaco"),
'MN' => _("Mongolia"),
'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"),
'MP' => _("Northern Mariana Islands"),
'NO' => _("Norway"),
'OM' => _("Oman"),
'PK' => _("Pakistan"),
'PW' => _("Palau"),
'PS' => _("Palestinian Territory, Occupied"),
'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' => _("Russian Federation"),
'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"),
'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"),
'ES' => _("Spain"),
'LK' => _("Sri Lanka"),
'SD' => _("Sudan"),
'SR' => _("Suriname"),
'SJ' => _("Svalbard and Jan Mayen"),
'SZ' => _("Swaziland"),
'SE' => _("Sweden"),
'CH' => _("Switzerland"),
'SY' => _("Syrian Arab Republic"),
'TW' => _("Taiwan, Province of China"),
'TJ' => _("Tajikistan"),
'TZ' => _("Tanzania, United Republic of"),
'TH' => _("Thailand"),
'TL' => _("Timor-Leste"),
'TG' => _("Togo"),
'TK' => _("Tokelau"),
'TO' => _("Tonga"),
'TT' => _("Trinidad and Tobago"),
'TN' => _("Tunisia"),
'TR' => _("Turkey"),
'TM' => _("Turkmenistan"),
'TC' => _("Turks and Caicos Islands"),
'TV' => _("Tuvalu"),
'UG' => _("Uganda"),
'UA' => _("Ukraine"),
'AE' => _("United Arab Emirates"),
'GB' => _("United Kingdom"),
'US' => _("United States"),
'UM' => _("United States Minor Outlying Islands"),
'UY' => _("Uruguay"),
'UZ' => _("Uzbekistan"),
'VU' => _("Vanuatu"),
'VE' => _("Venezuela"),
'VN' => _("Viet Nam"),
'VG' => _("Virgin Islands, British"),
'VI' => _("Virgin Islands, U.S."),
'WF' => _("Wallis and Futuna"),
'EH' => _("Western Sahara"),
'YE' => _("Yemen"),
'ZM' => _("Zambia"),
'ZW' => _("Zimbabwe"));
--- NEW FILE: tld.php ---
<?php
/**
* Top level domain (TLD) list for country codes.
* Generated from IANA (Internet Assigned Numbers Authority) data located
* at http://www.iana.org/cctld/cctld-whois.htm
*
* Format:
* $tld['countrycode'] = 'countryname';
*
* $Horde: framework/NLS/NLS/tld.php,v 1.5 2004/01/04 02:24:05 mdjukic Exp $
*
* @package Horde_NLS
*/
$tld = array(
'ac' => _("Ascension Island"),
'ad' => _("Andorra"),
'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"),
'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' => _("Congo, The Democratic Republic of the"),
'cf' => _("Central African Republic"),
'cg' => _("Congo"),
'ch' => _("Switzerland"),
'ci' => _("Cote d'Ivoire"),
'ck' => _("Cook Islands"),
'cl' => _("Chile"),
'cm' => _("Cameroon"),
'cn' => _("China"),
'co' => _("Colombia"),
'cr' => _("Costa Rica"),
'cu' => _("Cuba"),
'cv' => _("Cape Verde"),
'cx' => _("Christmas Island"),
'cy' => _("Cyprus"),
'cz' => _("Czech Republic"),
'de' => _("Germany"),
'dj' => _("Djibouti"),
'dk' => _("Denmark"),
'dm' => _("Dominica"),
'do' => _("Dominican Republic"),
'dz' => _("Algeria"),
'ec' => _("Ecuador"),
'ee' => _("Estonia"),
'eg' => _("Egypt"),
'eh' => _("Western Sahara"),
'er' => _("Eritrea"),
'es' => _("Spain"),
'et' => _("Ethiopia"),
'fi' => _("Finland"),
'fj' => _("Fiji"),
'fk' => _("Falkland Islands (Malvinas)"),
'fm' => _("Micronesia, Federated States of"),
'fo' => _("Faroe Islands"),
'fr' => _("France"),
'ga' => _("Gabon"),
'gd' => _("Grenada"),
'ge' => _("Georgia"),
'gf' => _("French Guiana"),
'gg' => _("Guernsey"),
'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"),
'ht' => _("Haiti"),
'hu' => _("Hungary"),
'id' => _("Indonesia"),
'ie' => _("Ireland"),
'il' => _("Israel"),
'im' => _("Isle of Man"),
'in' => _("India"),
'io' => _("British Indian Ocean Territory"),
'iq' => _("Iraq"),
'ir' => _("Iran, Islamic Republic of"),
'is' => _("Iceland"),
'it' => _("Italy"),
'je' => _("Jersey"),
'jm' => _("Jamaica"),
'jo' => _("Jordan"),
'jp' => _("Japan"),
'ke' => _("Kenya"),
'kg' => _("Kyrgyzstan"),
'kh' => _("Cambodia"),
'ki' => _("Kiribati"),
'km' => _("Comoros"),
'kn' => _("Saint Kitts and Nevis"),
'kp' => _("Korea, Democratic People's Republic of"),
'kr' => _("Korea, Republic of"),
'kw' => _("Kuwait"),
'ky' => _("Cayman Islands"),
'kz' => _("Kazakhstan"),
'la' => _("Lao People's Democratic Republic"),
'lb' => _("Lebanon"),
'lc' => _("Saint Lucia"),
'li' => _("Liechtenstein"),
'lk' => _("Sri Lanka"),
'lr' => _("Liberia"),
'ls' => _("Lesotho"),
'lt' => _("Lithuania"),
'lu' => _("Luxembourg"),
'lv' => _("Latvia"),
'ly' => _("Libyan Arab Jamahiriya"),
'ma' => _("Morocco"),
'mc' => _("Monaco"),
'md' => _("Moldova, Republic of"),
'mg' => _("Madagascar"),
'mh' => _("Marshall Islands"),
'mk' => _("Macedonia, The Former Yugoslav Republic of"),
'ml' => _("Mali"),
'mm' => _("Myanmar"),
'mn' => _("Mongolia"),
'mo' => _("Macao"),
'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"),
'pr' => _("Puerto Rico"),
'ps' => _("Palestinian Territory, Occupied"),
'pt' => _("Portugal"),
'pw' => _("Palau"),
'py' => _("Paraguay"),
'qa' => _("Qatar"),
're' => _("Reunion"),
'ro' => _("Romania"),
'ru' => _("Russian Federation"),
'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"),
'sk' => _("Slovakia"),
'sl' => _("Sierra Leone"),
'sm' => _("San Marino"),
'sn' => _("Senegal"),
'so' => _("Somalia"),
'sr' => _("Suriname"),
'st' => _("Sao Tome and Principe"),
'sv' => _("El Salvador"),
'sy' => _("Syrian Arab Republic"),
'sz' => _("Swaziland"),
'tc' => _("Turks and Caicos Islands"),
'td' => _("Chad"),
'tf' => _("French Southern Territories"),
'tg' => _("Togo"),
'th' => _("Thailand"),
'tj' => _("Tajikistan"),
'tk' => _("Tokelau"),
'tm' => _("Turkmenistan"),
'tn' => _("Tunisia"),
'to' => _("Tonga"),
'tp' => _("Timor-Leste"),
'tr' => _("Turkey"),
'tt' => _("Trinidad and Tobago"),
'tv' => _("Tuvalu"),
'tw' => _("Taiwan"),
'tz' => _("Tanzania, United Republic of"),
'ua' => _("Ukraine"),
'ug' => _("Uganda"),
'uk' => _("United Kingdom"),
'um' => _("United States Minor Outlying Islands"),
'us' => _("United States"),
'uy' => _("Uruguay"),
'uz' => _("Uzbekistan"),
'va' => _("Holy See (Vatican City State)"),
'vc' => _("Saint Vincent and the Grenadines"),
've' => _("Venezuela"),
'vg' => _("Virgin Islands, British"),
'vi' => _("Virgin Islands, U.S."),
'vn' => _("Viet Nam"),
'vu' => _("Vanuatu"),
'wf' => _("Wallis and Futuna"),
'ws' => _("Samoa"),
'ye' => _("Yemen"),
'yt' => _("Mayotte"),
'yu' => _("Yugoslavia"),
'za' => _("South Africa"),
'zm' => _("Zambia"),
'zw' => _("Zimbabwe")
);
More information about the commits
mailing list