From dc5804542376c208b46a6ca49a2b2f5d6ac9c5a6 Mon Sep 17 00:00:00 2001 From: Roland Rusch Date: Thu, 10 Aug 2023 15:29:25 +0200 Subject: [PATCH 1/5] RETROTEC-AG/OpenXE#17 Locale des GUI-Users ermitteln --- classes/Components/I18n/Bootstrap.php | 90 + .../I18n/Dataaccess/ArrayAccessTrait.php | 69 + .../I18n/Dataaccess/CountableTrait.php | 26 + .../Components/I18n/Dataaccess/DataFilter.php | 76 + .../I18n/Dataaccess/DataFilterInterface.php | 34 + .../I18n/Dataaccess/DataProvider.php | 121 + .../I18n/Dataaccess/DataProviderInterface.php | 49 + .../Exception/OutOfRangeException.php | 10 + .../I18n/Dataaccess/IteratorTrait.php | 96 + .../LanguageNotInitializedException.php | 10 + .../UnsupportedLocaleStringException.php | 8 + classes/Components/I18n/Iso3166.php | 27 + .../Components/I18n/Iso3166/Filter/All.php | 27 + .../I18n/Iso3166/Filter/CentralEurope.php | 37 + .../I18n/Iso3166/Filter/ChangeKey.php | 51 + .../Components/I18n/Iso3166/Filter/Custom.php | 59 + .../Components/I18n/Iso3166/Filter/Europe.php | 28 + classes/Components/I18n/Iso3166/Key.php | 71 + classes/Components/I18n/Iso3166/Name.php | 28 + classes/Components/I18n/Iso639.php | 69 + classes/Components/I18n/Iso639/Filter/All.php | 28 + .../I18n/Iso639/Filter/CentralEurope.php | 37 + .../I18n/Iso639/Filter/ChangeKey.php | 51 + .../Components/I18n/Iso639/Filter/Custom.php | 59 + classes/Components/I18n/Iso639/Key.php | 47 + classes/Components/I18n/Iso639/Name.php | 29 + classes/Components/I18n/Localization.php | 206 + .../Components/I18n/LocalizationInterface.php | 58 + classes/Components/I18n/data/Iso3166data.php | 5256 +++++++++++++++++ classes/Components/I18n/data/Iso639data.php | 155 + 30 files changed, 6912 insertions(+) create mode 100644 classes/Components/I18n/Bootstrap.php create mode 100644 classes/Components/I18n/Dataaccess/ArrayAccessTrait.php create mode 100644 classes/Components/I18n/Dataaccess/CountableTrait.php create mode 100644 classes/Components/I18n/Dataaccess/DataFilter.php create mode 100644 classes/Components/I18n/Dataaccess/DataFilterInterface.php create mode 100644 classes/Components/I18n/Dataaccess/DataProvider.php create mode 100644 classes/Components/I18n/Dataaccess/DataProviderInterface.php create mode 100644 classes/Components/I18n/Dataaccess/Exception/OutOfRangeException.php create mode 100644 classes/Components/I18n/Dataaccess/IteratorTrait.php create mode 100644 classes/Components/I18n/Exception/LanguageNotInitializedException.php create mode 100644 classes/Components/I18n/Exception/UnsupportedLocaleStringException.php create mode 100644 classes/Components/I18n/Iso3166.php create mode 100644 classes/Components/I18n/Iso3166/Filter/All.php create mode 100644 classes/Components/I18n/Iso3166/Filter/CentralEurope.php create mode 100644 classes/Components/I18n/Iso3166/Filter/ChangeKey.php create mode 100644 classes/Components/I18n/Iso3166/Filter/Custom.php create mode 100644 classes/Components/I18n/Iso3166/Filter/Europe.php create mode 100644 classes/Components/I18n/Iso3166/Key.php create mode 100644 classes/Components/I18n/Iso3166/Name.php create mode 100644 classes/Components/I18n/Iso639.php create mode 100644 classes/Components/I18n/Iso639/Filter/All.php create mode 100644 classes/Components/I18n/Iso639/Filter/CentralEurope.php create mode 100644 classes/Components/I18n/Iso639/Filter/ChangeKey.php create mode 100644 classes/Components/I18n/Iso639/Filter/Custom.php create mode 100644 classes/Components/I18n/Iso639/Key.php create mode 100644 classes/Components/I18n/Iso639/Name.php create mode 100644 classes/Components/I18n/Localization.php create mode 100644 classes/Components/I18n/LocalizationInterface.php create mode 100644 classes/Components/I18n/data/Iso3166data.php create mode 100644 classes/Components/I18n/data/Iso639data.php diff --git a/classes/Components/I18n/Bootstrap.php b/classes/Components/I18n/Bootstrap.php new file mode 100644 index 00000000..f2e321ab --- /dev/null +++ b/classes/Components/I18n/Bootstrap.php @@ -0,0 +1,90 @@ + 'onInitLocalization', + ]; + } + + + + /** + * This is the factory for the Localization object. + * + * @param ServiceContainer $container + * + * @return Localization + */ + public static function onInitLocalization(ServiceContainer $container): Localization + { + /** @var Request $request */ + $request = $container->get('Request'); + /** @var Session $session */ + $session = $container->get('Session'); + /** @var \erpooSystem $app */ + $app = $container->get('LegacyApplication'); + /** @var Database $db */ + $db = $container->get('Database'); + + + // Get User + $usersettings = []; + if ($user = $app->User) { + // Get User's address from user + $userAddress = $db->fetchRow( + $db->select()->cols(['*'])->from('adresse')->where('id=:id'), + ['id' => $user->GetAdresse()] + ); + + + // Get language from user account and normalize to 3-letter-code and 2-letter-code + $userSprache = strtolower($user->GetSprache()); + $userLang2 = null; + $userLang3 = null; + foreach ((new Iso639(new Iso639\Filter\CentralEurope())) as $key => $val) { + if (array_filter($val, function ($str) use ($userSprache) { + return $str && (strtolower($str) == $userSprache); + })) { + $userLang2 = $val[Iso639\Key::ALPHA_2]; + $userLang3 = $val[Iso639\Key::ALPHA_3]; + } + } + if ($userLang3) { + $usersettings['language'] = $userLang3; + } + + + // Get region from user account and normalize to 2-letter-code + $userLand = strtolower($userAddress['land'] ?? ''); + $userRegion = null; + foreach ((new Iso3166(new Iso3166\Filter\CentralEurope())) as $key => $val) { + if (array_filter($val, function ($str) use ($userLand) { + return $str && (strtolower($str) == $userLand); + })) { + $userRegion = $val[Iso3166\Key::ALPHA_2]; + } + } + if ($userLang2 && $userRegion) { + $usersettings['locale'] = "{$userLang2}_{$userRegion}"; + } + } + + // Create Localization object + return new Localization($request, $session, $usersettings); + } +} diff --git a/classes/Components/I18n/Dataaccess/ArrayAccessTrait.php b/classes/Components/I18n/Dataaccess/ArrayAccessTrait.php new file mode 100644 index 00000000..b32eef00 --- /dev/null +++ b/classes/Components/I18n/Dataaccess/ArrayAccessTrait.php @@ -0,0 +1,69 @@ + + */ +trait ArrayAccessTrait +{ + /** + * Whether an offset exists. + * + * @param string $offset + * + * @return bool + */ + public function offsetExists($offset): bool + { + return array_key_exists($offset, $this->DataProvider_DATA); + } + + + + /** + * Offset to retrieve. + * + * @param string $offset + * + * @return array + */ + public function offsetGet($offset): array + { + return $this->DataProvider_DATA[$offset]; + } + + + + /** + * Assign a value to the specified offset. + * No function since data set is read only. + * + * @param string $offset + * @param array $value + */ + public function offsetSet($offset, $value) + { +// $this->DataProvider_DATA[$offset]=$value; + } + + + + /** + * Unset an offset. + * No function since data set is read only. + * + * @param string $offset + */ + public function offsetUnset($offset) + { +// unset($this->DataProvider_DATA[$offset]); + } +} diff --git a/classes/Components/I18n/Dataaccess/CountableTrait.php b/classes/Components/I18n/Dataaccess/CountableTrait.php new file mode 100644 index 00000000..d819e2dc --- /dev/null +++ b/classes/Components/I18n/Dataaccess/CountableTrait.php @@ -0,0 +1,26 @@ + + */ +trait CountableTrait +{ + /** + * Counts the number of records in the private $data array. + * + * @return int Number of records + */ + public function count(): int + { + return count($this->DataProvider_DATA); + } +} diff --git a/classes/Components/I18n/Dataaccess/DataFilter.php b/classes/Components/I18n/Dataaccess/DataFilter.php new file mode 100644 index 00000000..a1750eba --- /dev/null +++ b/classes/Components/I18n/Dataaccess/DataFilter.php @@ -0,0 +1,76 @@ + + */ +abstract class DataFilter implements DataFilterInterface +{ + /** + * Pointer to next filter in chain. + * + * @var DataFilterInterface + */ + private $nextFilter = null; + + + + /** + * {@inheritDoc} + * @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface::then() + */ + public function then(DataFilterInterface $filter): DataFilterInterface + { + if (!$this->nextFilter) { + $this->nextFilter = $filter; + } else { + $this->nextFilter->then($filter); + } + return $this; + } + + + + /** + * Applies the filter to the data and executes the next filter + * if present. + * + * @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface::__invoke() + */ + public function __invoke(array $data): array + { +// echo get_called_class()."::__invoke(\$data)".PHP_EOL; + + $filteredData = []; + foreach ($data as $key => $val) { + if ($this->selectItem($key, $val)) { + $filteredData[$key] = $val; + } + } + + if ($this->nextFilter) { + $filteredData = ($this->nextFilter)($filteredData); + } + return $filteredData; + } + + + + /** + * Check if the current item is to be selected for + * the dataset. + * + * @param mixed $key + * @param mixed $val + * + * @return bool + */ + abstract protected function selectItem(&$key, &$val): bool; +} diff --git a/classes/Components/I18n/Dataaccess/DataFilterInterface.php b/classes/Components/I18n/Dataaccess/DataFilterInterface.php new file mode 100644 index 00000000..748bb2df --- /dev/null +++ b/classes/Components/I18n/Dataaccess/DataFilterInterface.php @@ -0,0 +1,34 @@ + + */ +interface DataFilterInterface +{ + /** + * Add a filter to the end of the filter chain. + * + * @param DataFilterInterface $filter Filter to add + * + * @return DataFilterInterface Start of filter chain + */ + function then(DataFilterInterface $filter): DataFilterInterface; + + + + /** + * Applies the filter to the data and executes the next filter + * if present. + * + * @see \Ruga\I18n\Dataaccess\DataFilterInterface::__invoke() + */ + function __invoke(array $data): array; +} diff --git a/classes/Components/I18n/Dataaccess/DataProvider.php b/classes/Components/I18n/Dataaccess/DataProvider.php new file mode 100644 index 00000000..fceb0c3f --- /dev/null +++ b/classes/Components/I18n/Dataaccess/DataProvider.php @@ -0,0 +1,121 @@ + + */ +abstract class DataProvider implements Countable, Iterator, ArrayAccess, DataProviderInterface +{ + use CountableTrait; + use IteratorTrait; + use ArrayAccessTrait; + + + /** + * Holds filtered data. + * + * @var mixed + */ + private $DataProvider_DATA = null; + + + + /** + * Create the object and apply data filter. + * + * @param DataFilterInterface|null $filter + */ + public function __construct(DataFilterInterface $filter = null) + { + if ($filter) { + $this->DataProvider_DATA = $filter($this->getOriginalData()); + } else { + $this->DataProvider_DATA = $this->getOriginalData(); + } + } + + + + /** + * Returns the original data array). + * Raw data before any filtering takes place. + * + * @return array + */ + abstract protected function getOriginalData(): array; + + + + /** + * Returns an array suitable for select fields. + * The key of the filtered data set is used as key of the + * array and $desiredName field is used as value. + * + * @param string $desiredName + * + * @return array; + */ + public function getMultiOptions($desiredName = 'NAME_deu'): array + { + $a = []; + foreach ($this as $key => $l) { + $a[$key] = $l[$desiredName]; + } + return $a; + } + + + + /** + * Returns the field $desiredName from the record $id. + * + * @param mixed $id + * @param string $desiredName + * + * @return string + */ + public function getString($id, $desiredName): string + { + if (!isset($this[$id])) { + throw new Exception\OutOfRangeException("Index '{$id}' not found"); + } + $d = $this[$id]; + if ($desiredName) { + if ($desiredName == 'POST') { + return strtoupper($this->getString($id, 'NAME_eng')); + } + return $d[$desiredName]; + } + throw new Exception\OutOfRangeException("No '{$desiredName}' data for '{$id}'"); + } + + + + /** + * Returns the item at position $id. + * + * @param string $id + * + * @return mixed + */ + public function getData($id) + { + if (empty($id)) { + return null; + } + if (!isset($this[$id])) { + throw new Exception\OutOfRangeException("Index '{$id}' not found."); + } + return $this[$id]; + } +} diff --git a/classes/Components/I18n/Dataaccess/DataProviderInterface.php b/classes/Components/I18n/Dataaccess/DataProviderInterface.php new file mode 100644 index 00000000..c0f4c4a3 --- /dev/null +++ b/classes/Components/I18n/Dataaccess/DataProviderInterface.php @@ -0,0 +1,49 @@ + + */ +interface DataProviderInterface +{ + /** + * Returns an array suitable for select fields. + * The key of the filtered data set is used as key of the + * array and $desiredName field is used as value. + * + * @param string $desiredName + * + * @return array; + */ + public function getMultiOptions($desiredName): array; + + + + /** + * Returns the field $desiredName from the record $id. + * + * @param mixed $id + * @param string $desiredName + * + * @return string + */ + public function getString($id, $desiredName): string; + + + + /** + * Returns the item at position $id. + * + * @param string $id + * + * @return mixed + */ + public function getData($id); +} diff --git a/classes/Components/I18n/Dataaccess/Exception/OutOfRangeException.php b/classes/Components/I18n/Dataaccess/Exception/OutOfRangeException.php new file mode 100644 index 00000000..16569ecf --- /dev/null +++ b/classes/Components/I18n/Dataaccess/Exception/OutOfRangeException.php @@ -0,0 +1,10 @@ + + */ +trait IteratorTrait +{ + /** + * Index of the current element's key. + * + * @var string + */ + private $IteratorTrait_index = null; + + /** + * Array of keys of the data set. + * + * @var array + */ + private $IteratorTrait_keys = null; + + + + /** + * Return the current element. + * + * @return mixed + */ + public function current() + { + return $this->valid() ? $this->DataProvider_DATA[$this->key()] : null; + } + + + + /** + * Return the key of the current element. + * + * @return mixed + */ + public function key() + { + return static::valid() ? $this->IteratorTrait_keys[$this->IteratorTrait_index] : null; + } + + + + /** + * Move forward to next element. + * + * @return bool false if invalid + */ + public function next() + { + $this->IteratorTrait_index++; + if (!$this->valid()) { + $this->IteratorTrait_index = null; + } + return $this->valid(); + } + + + + /** + * Rewind the Iterator to the first element. + */ + public function rewind() + { + $this->IteratorTrait_keys = array_keys($this->DataProvider_DATA); + sort($this->IteratorTrait_keys); + $this->IteratorTrait_index = 0; + } + + + + /** + * Checks if current position is valid. + * + * @return bool + */ + public function valid(): bool + { + return ($this->IteratorTrait_index !== null) + && array_key_exists($this->IteratorTrait_index, $this->IteratorTrait_keys) + && array_key_exists($this->IteratorTrait_keys[$this->IteratorTrait_index], $this->DataProvider_DATA); + } +} diff --git a/classes/Components/I18n/Exception/LanguageNotInitializedException.php b/classes/Components/I18n/Exception/LanguageNotInitializedException.php new file mode 100644 index 00000000..b7696797 --- /dev/null +++ b/classes/Components/I18n/Exception/LanguageNotInitializedException.php @@ -0,0 +1,10 @@ + + */ +class Iso3166 extends DataProvider +{ + /** + * {@inheritDoc} + * @see \Xentral\Components\I18n\Dataaccess\DataProvider::getOriginalData() + */ + protected function getOriginalData(): array + { + return include(__DIR__ . '/data/Iso3166data.php'); + } +} diff --git a/classes/Components/I18n/Iso3166/Filter/All.php b/classes/Components/I18n/Iso3166/Filter/All.php new file mode 100644 index 00000000..3dec30eb --- /dev/null +++ b/classes/Components/I18n/Iso3166/Filter/All.php @@ -0,0 +1,27 @@ + + */ +class All extends DataFilter implements DataFilterInterface +{ + /** + * {@inheritDoc} + * @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface::selectItem() + */ + function selectItem(&$key, &$val): bool + { + return true; + } +} diff --git a/classes/Components/I18n/Iso3166/Filter/CentralEurope.php b/classes/Components/I18n/Iso3166/Filter/CentralEurope.php new file mode 100644 index 00000000..76773d7d --- /dev/null +++ b/classes/Components/I18n/Iso3166/Filter/CentralEurope.php @@ -0,0 +1,37 @@ + + */ +class CentralEurope extends Custom implements DataFilterInterface +{ + /** + * Countries in Europe. + * + * @var array + */ + const CentralEurope_Countries = ['CHE', 'DEU', 'AUT', 'ITA', 'FRA', 'ESP', 'PRT', 'GBR']; + + + + /** + * Set predefined values. + */ + public function __construct() + { + parent::__construct(static::CentralEurope_Countries, Key::ALPHA_3); + } +} diff --git a/classes/Components/I18n/Iso3166/Filter/ChangeKey.php b/classes/Components/I18n/Iso3166/Filter/ChangeKey.php new file mode 100644 index 00000000..49d279de --- /dev/null +++ b/classes/Components/I18n/Iso3166/Filter/ChangeKey.php @@ -0,0 +1,51 @@ + + */ +class ChangeKey extends DataFilter implements DataFilterInterface +{ + /** + * New key to use for the data set. + * + * @var string + */ + private $ChangeKey_key = null; + + + + /** + * Initialize filter and set the new key. + * + * @param mixed $key + */ + public function __construct($key) + { + $this->ChangeKey_key = $key; + } + + + + /** + * {@inheritDoc} + * @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface::selectItem() + */ + protected function selectItem(&$key, &$val): bool + { + $key = $val[$this->ChangeKey_key]; + return true; + } +} diff --git a/classes/Components/I18n/Iso3166/Filter/Custom.php b/classes/Components/I18n/Iso3166/Filter/Custom.php new file mode 100644 index 00000000..b0f99236 --- /dev/null +++ b/classes/Components/I18n/Iso3166/Filter/Custom.php @@ -0,0 +1,59 @@ + + */ +class Custom extends DataFilter implements DataFilterInterface +{ + /** + * Array of wanted values. + * + * @var array + */ + private $Custom_values = null; + + /** + * Key to check for the values in $this->Custom_values. + * + * @var string + */ + private $Custom_key = null; + + + + /** + * Set values for filter. + * + * @param array $values + * @param mixed $key + */ + public function __construct(array $values, $key) + { + $this->Custom_values = $values; + $this->Custom_key = $key; + } + + + + /** + * {@inheritDoc} + * @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface::selectItem() + */ + protected function selectItem(&$key, &$val): bool + { + $needle = $val[$this->Custom_key]; + return in_array($needle, $this->Custom_values); + } +} diff --git a/classes/Components/I18n/Iso3166/Filter/Europe.php b/classes/Components/I18n/Iso3166/Filter/Europe.php new file mode 100644 index 00000000..cfb91f4b --- /dev/null +++ b/classes/Components/I18n/Iso3166/Filter/Europe.php @@ -0,0 +1,28 @@ + + */ +class Europe extends Custom implements DataFilterInterface +{ + /** + * Set predefined values. + */ + public function __construct() + { + parent::__construct(['150'], Key::REGION_CODE); + } +} diff --git a/classes/Components/I18n/Iso3166/Key.php b/classes/Components/I18n/Iso3166/Key.php new file mode 100644 index 00000000..f6d6bf34 --- /dev/null +++ b/classes/Components/I18n/Iso3166/Key.php @@ -0,0 +1,71 @@ + + */ +abstract class Key/* extends Ruga_Enum*/ +{ + /** Key: Alpha-2 code */ + const ALPHA_2 = 'A2'; + + /** Key: Alpha-3 code */ + const ALPHA_3 = 'A3'; + + /** Key: Numeric code */ + const NUMERIC = 'NUM'; + + /** Key: Top Level Domain */ + const TLD = 'TLD'; + + /** Key: Currency Code */ + const CURRENCY_CODE = 'CURRENCY_CODE'; + const TELEPHONE_CODE = 'TEL_CODE'; + const REGION = 'REGION'; + const REGION_CODE = 'REGION_CODE'; + const SUBREGION = 'SUBREGION'; + const SUBREGION_CODE = 'SUBREGION_CODE'; + const INTERMEDIATEREGION = 'INTERMEDIATEREGION'; + const INTERMEDIATEREGION_CODE = 'INTERMEDIATEREGION_CODE'; + const NAME_eng = 'NAME_eng'; + const NAME_fra = 'NAME_fra'; + const NAME_deu = 'NAME_deu'; + + + /** Key: Postal country name */ + const POST = 'POST'; + + + const DEFAULT = self::ALPHA_3; + + + protected static $fullnameMap = [ + self::ALPHA_2 => 'ISO 3166 Alpha-2', + self::ALPHA_3 => 'ISO 3166 Alpha-3', + self::NUMERIC => 'ISO 3166 Numerisch', + self::TLD => 'Top Level Domain', + self::CURRENCY_CODE => 'Währung', + self::TELEPHONE_CODE => 'Landesvorwahl', + self::REGION => 'Region', + self::REGION_CODE => 'Region Code', + self::SUBREGION => 'Unter-Region', + self::SUBREGION_CODE => 'Unter-Region Code', + self::INTERMEDIATEREGION => 'Intermediate-Region', + self::INTERMEDIATEREGION_CODE => 'Intermediate-Region Code', + self::NAME_eng => 'Englische Bezeichnung', + self::NAME_fra => 'Französische Bezeichnung', + self::NAME_deu => 'Deutsche Bezeichnung', + + self::POST => 'Landesbezeichung Postadresse', + ]; + + +} + diff --git a/classes/Components/I18n/Iso3166/Name.php b/classes/Components/I18n/Iso3166/Name.php new file mode 100644 index 00000000..ac08ddb8 --- /dev/null +++ b/classes/Components/I18n/Iso3166/Name.php @@ -0,0 +1,28 @@ + + */ +abstract class Name/* extends Ruga_Enum */ +{ + /** Englisch */ + const ENG = 'NAME_eng'; + /** Französisch */ + const FRA = 'NAME_fra'; + /** Deutsch */ + const DEU = 'NAME_deu'; + + + protected static $fullnameMap = [ + self::ENG => 'Englische Bezeichnung', + self::FRA => 'Französische Bezeichnung', + self::DEU => 'Deutsche Bezeichnung', + ]; +} diff --git a/classes/Components/I18n/Iso639.php b/classes/Components/I18n/Iso639.php new file mode 100644 index 00000000..19e3e1da --- /dev/null +++ b/classes/Components/I18n/Iso639.php @@ -0,0 +1,69 @@ + + */ +class Iso639 extends DataProvider +{ + /** + * {@inheritDoc} + * @see \Xentral\Components\I18n\Dataaccess\DataProvider::getOriginalData() + */ + protected function getOriginalData(): array + { + return include(__DIR__ . '/data/Iso639data.php'); + } + + + + /** + * Returns the field $desiredName from the record $id. + * + * @param mixed $id + * @param string $desiredName + * @param null $default + * + * @return string + */ + public function find($id, $desiredName, $default = null): string + { + $id = strtolower($id); + try { + return $this->getString($id, $desiredName); + } catch (OutOfRangeException $e) { + try { + return (new \Xentral\Components\I18n\Iso639( + (new \Xentral\Components\I18n\Iso639\Filter\All()) + ->then(new \Xentral\Components\I18n\Iso639\Filter\ChangeKey(\Xentral\Components\I18n\Iso639\Key::ALPHA_2)) + ))->getString($id, $desiredName); + } catch (OutOfRangeException $e) { + try { + $id = strtoupper($id); + return (new \Xentral\Components\I18n\Iso639( + (new \Xentral\Components\I18n\Iso639\Filter\All()) + ->then(new \Xentral\Components\I18n\Iso639\Filter\ChangeKey(\Xentral\Components\I18n\Iso639\Key::ONELETTER)) + ))->getString($id, $desiredName); + } catch (OutOfRangeException $e) { + if ($default === null) { + throw $e; + } else { + return $this->getString($default, $desiredName); + } + } + } + } + } + +} diff --git a/classes/Components/I18n/Iso639/Filter/All.php b/classes/Components/I18n/Iso639/Filter/All.php new file mode 100644 index 00000000..d0c9bb8a --- /dev/null +++ b/classes/Components/I18n/Iso639/Filter/All.php @@ -0,0 +1,28 @@ + + */ +class All extends DataFilter implements DataFilterInterface +{ + /** + * {@inheritDoc} + * @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface::selectItem() + */ + function selectItem(&$key, &$val): bool + { + return true; + } +} diff --git a/classes/Components/I18n/Iso639/Filter/CentralEurope.php b/classes/Components/I18n/Iso639/Filter/CentralEurope.php new file mode 100644 index 00000000..644bf090 --- /dev/null +++ b/classes/Components/I18n/Iso639/Filter/CentralEurope.php @@ -0,0 +1,37 @@ + + */ +class CentralEurope extends Custom implements DataFilterInterface +{ + /** + * Countries in Europe. + * + * @var array + */ + const CentralEurope_Languages = ['deu', 'fra', 'ita', 'roh', 'spa', 'por', 'eng']; + + + + /** + * Set predefined values. + */ + public function __construct() + { + parent::__construct(static::CentralEurope_Languages, Key::ALPHA_3); + } +} diff --git a/classes/Components/I18n/Iso639/Filter/ChangeKey.php b/classes/Components/I18n/Iso639/Filter/ChangeKey.php new file mode 100644 index 00000000..b41d4d4b --- /dev/null +++ b/classes/Components/I18n/Iso639/Filter/ChangeKey.php @@ -0,0 +1,51 @@ + + */ +class ChangeKey extends DataFilter implements DataFilterInterface +{ + /** + * New key to use for the data set. + * + * @var string + */ + private $ChangeKey_key = null; + + + + /** + * Initialize filter and set the new key. + * + * @param mixed $key + */ + public function __construct($key) + { + $this->ChangeKey_key = $key; + } + + + + /** + * {@inheritDoc} + * @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface::selectItem() + */ + protected function selectItem(&$key, &$val): bool + { + $key = $val[$this->ChangeKey_key] ?? null; + return true; + } +} diff --git a/classes/Components/I18n/Iso639/Filter/Custom.php b/classes/Components/I18n/Iso639/Filter/Custom.php new file mode 100644 index 00000000..3c1b8698 --- /dev/null +++ b/classes/Components/I18n/Iso639/Filter/Custom.php @@ -0,0 +1,59 @@ + + */ +class Custom extends DataFilter implements DataFilterInterface +{ + /** + * Array of wanted values. + * + * @var array + */ + private $Custom_values = null; + + /** + * Key to check for the values in $this->Custom_values. + * + * @var string + */ + private $Custom_key = null; + + + + /** + * Set values for filter. + * + * @param array $values + * @param mixed $key + */ + public function __construct(array $values, $key) + { + $this->Custom_values = $values; + $this->Custom_key = $key; + } + + + + /** + * {@inheritDoc} + * @see \Xentral\Components\I18n\Dataaccess\DataFilterInterface::selectItem() + */ + protected function selectItem(&$key, &$val): bool + { + $needle = $val[$this->Custom_key]; + return in_array($needle, $this->Custom_values); + } +} diff --git a/classes/Components/I18n/Iso639/Key.php b/classes/Components/I18n/Iso639/Key.php new file mode 100644 index 00000000..4ef629f6 --- /dev/null +++ b/classes/Components/I18n/Iso639/Key.php @@ -0,0 +1,47 @@ + + */ +abstract class Key/* extends Ruga_Enum*/ +{ + /** Key: Alpha-2 code */ + const ALPHA_2 = '639-1'; + const ISO639_1 = '639-1'; + + /** Key: Alpha-3 code */ + const ALPHA_3 = '639-2'; + const ISO639_2 = '639-2'; + + /** Key: Top Level Domain */ + const ONELETTER = '1L'; + + /** Key: Name */ + const NAME_eng = 'NAME_eng'; + const NAME_fra = 'NAME_fra'; + const NAME_deu = 'NAME_deu'; + + + const DEFAULT = self::ALPHA_3; + + + protected static $fullnameMap = [ + self::ALPHA_2 => 'ISO 639 Alpha-2', + self::ALPHA_3 => 'ISO 639 Alpha-3', + self::ONELETTER => 'ISO 639 Alpha-1', + self::NAME_eng => 'Englische Bezeichnung', + self::NAME_fra => 'Französische Bezeichnung', + self::NAME_deu => 'Deutsche Bezeichnung', + ]; + + +} + diff --git a/classes/Components/I18n/Iso639/Name.php b/classes/Components/I18n/Iso639/Name.php new file mode 100644 index 00000000..d915d048 --- /dev/null +++ b/classes/Components/I18n/Iso639/Name.php @@ -0,0 +1,29 @@ + + */ +abstract class Name/* extends Ruga_Enum */ +{ + /** Englisch */ + const ENG = 'NAME_eng'; + /** Französisch */ + const FRA = 'NAME_fra'; + /** Deutsch */ + const DEU = 'NAME_deu'; + + + protected static $fullnameMap = [ + self::ENG => 'Englische Bezeichnung', + self::FRA => 'Französische Bezeichnung', + self::DEU => 'Deutsche Bezeichnung', + ]; +} diff --git a/classes/Components/I18n/Localization.php b/classes/Components/I18n/Localization.php new file mode 100644 index 00000000..9b6ec431 --- /dev/null +++ b/classes/Components/I18n/Localization.php @@ -0,0 +1,206 @@ +request = $request; + $this->session = $session; + $this->usersettings = $usersettings; + $this->config = []; + $this->process(); + } + + + + public function process() + { + // Hardcoded defaults if config is not available + $localeDefault = $this->config[Localization::LOCALE_DEFAULT] ?? 'de_DE'; + $localeAttrName = $this->config[Localization::LOCALE_ATTRIBUTE_NAME] ?? 'locale'; + $langDefault = $this->config[Localization::LANGUAGE_DEFAULT] ?? 'deu'; + $langAttrName = $this->config[Localization::LANGUAGE_ATTRIBUTE_NAME] ?? 'language'; + + $segmentName = 'i18n'; +// $session = $this->session; +// $request = $this->request; + + // Get the locale from the session, if available + if ($this->session && ($locale = $this->session->getValue($segmentName, $localeAttrName))) { + } else { + // Get locale from request, fallback to the user's browser preference + if ($this->request) { + $locale = $this->request->attributes->get( + $localeAttrName, + Locale::acceptFromHttp( + $this->request->getHeader('Accept-Language', $localeDefault) + ) ?? $localeDefault + ); + } else { + $locale = Locale::acceptFromHttp($_SERVER['HTTP_ACCEPT_LANGUAGE'] ?? $localeDefault); + } + } + // Get locale from user + // This overrides all previous attempts to find a locale + if (array_key_exists('locale', $this->usersettings)) { + $locale = $this->usersettings['locale']; + } + // Get locale from query string + // This overrides all previous attempts to find a locale + if ($this->request) { + $locale = $this->request->getParam($localeAttrName, $locale ?? $localeDefault); + } else { + $locale = $_GET[$localeAttrName] ?? $locale ?? $localeDefault; + } + + + // Get the language from the session, if available + if ($this->session && ($language = $this->session->getValue($segmentName, $langAttrName))) { + } else { + // Get language from request, fallback to the current locale + if ($this->request) { + $language = $this->request->attributes->get($langAttrName, Locale::getPrimaryLanguage($locale)); + } else { + $language = Locale::getPrimaryLanguage($locale); + } + } + // Get language from user + // This overrides all previous attempts to find a language + if (array_key_exists('language', $this->usersettings)) { + $language = $this->usersettings['language']; + } + // Get language from query string + // This overrides all previous attempts to find a language + if ($this->request) { + $language = $this->request->getParam($langAttrName, $language ?? $langDefault); + } else { + $language = $language ?? $langDefault; + } + + // Check language against the data from Iso639 (and normalize to 3-letter-code) + $language = (new Iso639())->find($language, Iso639\Key::DEFAULT, $langDefault); + + + // Store the locale and language to the LocalizationInterface + $this->setLanguage($language); + $this->setLocale($locale); + + // Store the locale and language to the session + if ($this->session) { + $this->session->setValue($segmentName, $localeAttrName, $locale); + $this->session->setValue($segmentName, $langAttrName, $language); + } + + // Store the locale and language as a request attribute + if ($this->request) { + $this->request->attributes->set($localeAttrName, $locale); + $this->request->attributes->set($langAttrName, $language); + } + + // Set the default locale + Locale::setDefault($locale); + +// error_log(self::class . ": {$locale}"); + } + + + + /** + * Set the language. + * + * @param string $language + */ + public function setLanguage(string $language) + { + $this->language[Iso639\Key::DEFAULT] = (new \Xentral\Components\I18n\Iso639())->find( + $language, + Iso639\Key::DEFAULT + ); + } + + + + /** + * Return the language string as defined by $key. + * + * @param string|null $key A constant from Iso639\Key + * + * @return string + */ + public function getLanguage(string $key = null): string + { + if (!$key) { + $key = Iso639\Key::DEFAULT; + } + if (!($this->language[$key] ?? null)) { + if (!($this->language[Iso639\Key::DEFAULT] ?? null)) { + throw new LanguageNotInitializedException("Language is not set for key '" . Iso639\Key::DEFAULT . "'"); + } + $this->language[$key] = (new \Xentral\Components\I18n\Iso639())->find( + $this->language[Iso639\Key::DEFAULT], + $key + ); + } + return $this->language[$key]; + } + + + + /** + * Set the locale. + * + * @param string $locale + */ + public function setLocale(string $locale) + { + $parsedLocale = Locale::parseLocale($locale); + $locale = Locale::composeLocale([ + 'language' => $parsedLocale['language'], + 'region' => $parsedLocale['region'], + ]); + + if(!$locale) throw new UnsupportedLocaleStringException("The given locale string '{$locale}' is not supported"); + + $this->locale[Iso3166\Key::DEFAULT] = $locale; + } + + + + /** + * Return the locale string as defined by $key. + * + * @param string|null $key A constant from Iso3166\Key + * + * @return string + */ + public function getLocale(string $key = null): string + { + return $this->locale[Iso3166\Key::DEFAULT]; + } + + +} \ No newline at end of file diff --git a/classes/Components/I18n/LocalizationInterface.php b/classes/Components/I18n/LocalizationInterface.php new file mode 100644 index 00000000..9997a57c --- /dev/null +++ b/classes/Components/I18n/LocalizationInterface.php @@ -0,0 +1,58 @@ + + */ +interface LocalizationInterface +{ + const LOCALE_DEFAULT = 'locale_default'; + const LOCALE_ATTRIBUTE_NAME = 'locale_attr_name'; + const LANGUAGE_DEFAULT = 'language_default'; + const LANGUAGE_ATTRIBUTE_NAME = 'language_attr_name'; + + + + /** + * Set the language. + * + * @param string $language + */ + public function setLanguage(string $language); + + + + /** + * Return the language string as defined by $key. + * + * @param string|null $key A constant from Iso639\Key + * + * @return string + */ + public function getLanguage(string $key = null): string; + + + + /** + * Set the locale. + * + * @param string $locale + */ + public function setLocale(string $locale); + + + + /** + * Return the locale string as defined by $key. + * + * @param string|null $key A constant from Iso3166\Key + * + * @return string + */ + public function getLocale(string $key = null): string; +} \ No newline at end of file diff --git a/classes/Components/I18n/data/Iso3166data.php b/classes/Components/I18n/data/Iso3166data.php new file mode 100644 index 00000000..145a92fe --- /dev/null +++ b/classes/Components/I18n/data/Iso3166data.php @@ -0,0 +1,5256 @@ + [ + 'A3' => 'ABW', + 'A2' => 'AW', + 'NUM' => '533', + 'TLD' => 'aw', + 'IOC' => null, + 'ISO3166-2' => 'AW', + 'UN' => null, + 'CURRENCY_CODE' => 'AWG', + 'TEL_CODE' => '297', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Aruba", + 'NAME_fra' => "Aruba", + 'NAME_deu' => "Aruba", + ], + + 'AFG' => [ + 'A3' => 'AFG', + 'A2' => 'AF', + 'NUM' => '004', + 'TLD' => 'af', + 'IOC' => null, + 'ISO3166-2' => 'AF', + 'UN' => null, + 'CURRENCY_CODE' => 'AFN', + 'TEL_CODE' => '93', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Southern Asia', + 'SUBREGION_CODE' => '034', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Afghanistan", + 'NAME_fra' => "Afghanistan", + 'NAME_deu' => "Afghanistan", + ], + + 'AGO' => [ + 'A3' => 'AGO', + 'A2' => 'AO', + 'NUM' => '024', + 'TLD' => 'ao', + 'IOC' => null, + 'ISO3166-2' => 'AO', + 'UN' => null, + 'CURRENCY_CODE' => 'AOA', + 'TEL_CODE' => '244', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Middle Africa', + 'INTERMEDIATEREGION_CODE' => '017', + 'NAME_eng' => "Angola", + 'NAME_fra' => "Angola", + 'NAME_deu' => "Angola", + ], + + 'AIA' => [ + 'A3' => 'AIA', + 'A2' => 'AI', + 'NUM' => '660', + 'TLD' => 'ai', + 'IOC' => null, + 'ISO3166-2' => 'AI', + 'UN' => null, + 'CURRENCY_CODE' => 'XCD', + 'TEL_CODE' => '1-264', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Anguilla", + 'NAME_fra' => "Anguilla", + 'NAME_deu' => "Anguilla", + ], + + 'ALA' => [ + 'A3' => 'ALA', + 'A2' => 'AX', + 'NUM' => '248', + 'TLD' => 'ax', + 'IOC' => null, + 'ISO3166-2' => 'AX', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '358', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Northern Europe', + 'SUBREGION_CODE' => '154', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Åland Islands", + 'NAME_fra' => "Åland, Îles", + 'NAME_deu' => "Åland", + ], + + 'ALB' => [ + 'A3' => 'ALB', + 'A2' => 'AL', + 'NUM' => '008', + 'TLD' => 'al', + 'IOC' => null, + 'ISO3166-2' => 'AL', + 'UN' => null, + 'CURRENCY_CODE' => 'ALL', + 'TEL_CODE' => '355', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Southern Europe', + 'SUBREGION_CODE' => '039', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Albania", + 'NAME_fra' => "Albanie", + 'NAME_deu' => "Albanien", + ], + + 'AND' => [ + 'A3' => 'AND', + 'A2' => 'AD', + 'NUM' => '020', + 'TLD' => 'ad', + 'IOC' => null, + 'ISO3166-2' => 'AD', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '376', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Southern Europe', + 'SUBREGION_CODE' => '039', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Andorra", + 'NAME_fra' => "Andorre", + 'NAME_deu' => "Andorra", + ], + + 'ARE' => [ + 'A3' => 'ARE', + 'A2' => 'AE', + 'NUM' => '784', + 'TLD' => 'ae', + 'IOC' => null, + 'ISO3166-2' => 'AE', + 'UN' => null, + 'CURRENCY_CODE' => 'AED', + 'TEL_CODE' => '971', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Western Asia', + 'SUBREGION_CODE' => '145', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "United Arab Emirates", + 'NAME_fra' => "Émirats Arabes Unis", + 'NAME_deu' => "Vereinigte Arabische Emirate", + ], + + 'ARG' => [ + 'A3' => 'ARG', + 'A2' => 'AR', + 'NUM' => '032', + 'TLD' => 'ar', + 'IOC' => null, + 'ISO3166-2' => 'AR', + 'UN' => null, + 'CURRENCY_CODE' => 'ARS', + 'TEL_CODE' => '54', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'South America', + 'INTERMEDIATEREGION_CODE' => '005', + 'NAME_eng' => "Argentina", + 'NAME_fra' => "Argentine", + 'NAME_deu' => "Argentinien", + ], + + 'ARM' => [ + 'A3' => 'ARM', + 'A2' => 'AM', + 'NUM' => '051', + 'TLD' => 'am', + 'IOC' => null, + 'ISO3166-2' => 'AM', + 'UN' => null, + 'CURRENCY_CODE' => 'AMD', + 'TEL_CODE' => '374', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Western Asia', + 'SUBREGION_CODE' => '145', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Armenia", + 'NAME_fra' => "Arménie", + 'NAME_deu' => "Armenien", + ], + + 'ASM' => [ + 'A3' => 'ASM', + 'A2' => 'AS', + 'NUM' => '016', + 'TLD' => 'as', + 'IOC' => null, + 'ISO3166-2' => 'AS', + 'UN' => null, + 'CURRENCY_CODE' => 'USD', + 'TEL_CODE' => '1-684', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Polynesia', + 'SUBREGION_CODE' => '061', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "American Samoa", + 'NAME_fra' => "Samoa Américaines", + 'NAME_deu' => "Amerikanisch-Samoa", + ], + + 'ATA' => [ + 'A3' => 'ATA', + 'A2' => 'AQ', + 'NUM' => '010', + 'TLD' => 'aq', + 'IOC' => null, + 'ISO3166-2' => 'AQ', + 'UN' => null, + 'CURRENCY_CODE' => null, + 'TEL_CODE' => '672', + 'REGION' => '', + 'REGION_CODE' => '', + 'SUBREGION' => '', + 'SUBREGION_CODE' => '', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Antarctica", + 'NAME_fra' => "Antarctique", + 'NAME_deu' => "Antarktika", + ], + + 'ATF' => [ + 'A3' => 'ATF', + 'A2' => 'TF', + 'NUM' => '260', + 'TLD' => 'tf', + 'IOC' => null, + 'ISO3166-2' => 'TF', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '262', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "French Southern Territories", + 'NAME_fra' => "Terres Australes Françaises", + 'NAME_deu' => "Französische Süd- und Antarktisgebiete", + ], + + 'ATG' => [ + 'A3' => 'ATG', + 'A2' => 'AG', + 'NUM' => '028', + 'TLD' => 'ag', + 'IOC' => null, + 'ISO3166-2' => 'AG', + 'UN' => null, + 'CURRENCY_CODE' => 'XCD', + 'TEL_CODE' => '1-268', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Antigua and Barbuda", + 'NAME_fra' => "Antigua-Et-Barbuda", + 'NAME_deu' => "Antigua und Barbuda", + ], + + 'AUS' => [ + 'A3' => 'AUS', + 'A2' => 'AU', + 'NUM' => '036', + 'TLD' => 'au', + 'IOC' => null, + 'ISO3166-2' => 'AU', + 'UN' => null, + 'CURRENCY_CODE' => 'AUD', + 'TEL_CODE' => '61', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Australia and New Zealand', + 'SUBREGION_CODE' => '053', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Australia", + 'NAME_fra' => "Australie", + 'NAME_deu' => "Australien", + ], + + 'AUT' => [ + 'A3' => 'AUT', + 'A2' => 'AT', + 'NUM' => '040', + 'TLD' => 'at', + 'IOC' => null, + 'ISO3166-2' => 'AT', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '43', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Western Europe', + 'SUBREGION_CODE' => '155', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Austria", + 'NAME_fra' => "Autriche", + 'NAME_deu' => "Österreich", + ], + + 'AZE' => [ + 'A3' => 'AZE', + 'A2' => 'AZ', + 'NUM' => '031', + 'TLD' => 'az', + 'IOC' => null, + 'ISO3166-2' => 'AZ', + 'UN' => null, + 'CURRENCY_CODE' => 'AZN', + 'TEL_CODE' => '994', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Western Asia', + 'SUBREGION_CODE' => '145', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Azerbaijan", + 'NAME_fra' => "Azerbaïdjan", + 'NAME_deu' => "Aserbaidschan", + ], + + 'BDI' => [ + 'A3' => 'BDI', + 'A2' => 'BI', + 'NUM' => '108', + 'TLD' => 'bi', + 'IOC' => null, + 'ISO3166-2' => 'BI', + 'UN' => null, + 'CURRENCY_CODE' => 'BIF', + 'TEL_CODE' => '257', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "Burundi", + 'NAME_fra' => "Burundi", + 'NAME_deu' => "Burundi", + ], + + 'BEL' => [ + 'A3' => 'BEL', + 'A2' => 'BE', + 'NUM' => '056', + 'TLD' => 'be', + 'IOC' => null, + 'ISO3166-2' => 'BE', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '32', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Western Europe', + 'SUBREGION_CODE' => '155', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Belgium", + 'NAME_fra' => "Belgique", + 'NAME_deu' => "Belgien", + ], + + 'BEN' => [ + 'A3' => 'BEN', + 'A2' => 'BJ', + 'NUM' => '204', + 'TLD' => 'bj', + 'IOC' => null, + 'ISO3166-2' => 'BJ', + 'UN' => null, + 'CURRENCY_CODE' => 'XOF', + 'TEL_CODE' => '229', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Western Africa', + 'INTERMEDIATEREGION_CODE' => '011', + 'NAME_eng' => "Benin", + 'NAME_fra' => "Bénin", + 'NAME_deu' => "Benin", + ], + + 'BES' => [ + 'A3' => 'BES', + 'A2' => 'BQ', + 'NUM' => '535', + 'TLD' => 'bq', + 'IOC' => null, + 'ISO3166-2' => 'BQ', + 'UN' => null, + 'CURRENCY_CODE' => 'USD', + 'TEL_CODE' => '599', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Bonaire, Sint Eustatius and Saba", + 'NAME_fra' => "Bonaire, Saint-Eustache et Saba", + 'NAME_deu' => "Bonaire, Sint Eustatius und Saba", + ], + + 'BFA' => [ + 'A3' => 'BFA', + 'A2' => 'BF', + 'NUM' => '854', + 'TLD' => 'bf', + 'IOC' => null, + 'ISO3166-2' => 'BF', + 'UN' => null, + 'CURRENCY_CODE' => 'XOF', + 'TEL_CODE' => '226', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Western Africa', + 'INTERMEDIATEREGION_CODE' => '011', + 'NAME_eng' => "Burkina Faso", + 'NAME_fra' => "Burkina Faso", + 'NAME_deu' => "Burkina Faso", + ], + + 'BGD' => [ + 'A3' => 'BGD', + 'A2' => 'BD', + 'NUM' => '050', + 'TLD' => 'bd', + 'IOC' => null, + 'ISO3166-2' => 'BD', + 'UN' => null, + 'CURRENCY_CODE' => 'BDT', + 'TEL_CODE' => '880', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Southern Asia', + 'SUBREGION_CODE' => '034', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Bangladesh", + 'NAME_fra' => "Bangladesh", + 'NAME_deu' => "Bangladesch", + ], + + 'BGR' => [ + 'A3' => 'BGR', + 'A2' => 'BG', + 'NUM' => '100', + 'TLD' => 'bg', + 'IOC' => null, + 'ISO3166-2' => 'BG', + 'UN' => null, + 'CURRENCY_CODE' => 'BGN', + 'TEL_CODE' => '359', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Eastern Europe', + 'SUBREGION_CODE' => '151', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Bulgaria", + 'NAME_fra' => "Bulgarie", + 'NAME_deu' => "Bulgarien", + ], + + 'BHR' => [ + 'A3' => 'BHR', + 'A2' => 'BH', + 'NUM' => '048', + 'TLD' => 'bh', + 'IOC' => null, + 'ISO3166-2' => 'BH', + 'UN' => null, + 'CURRENCY_CODE' => 'BHD', + 'TEL_CODE' => '973', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Western Asia', + 'SUBREGION_CODE' => '145', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Bahrain", + 'NAME_fra' => "Bahreïn", + 'NAME_deu' => "Bahrain", + ], + + 'BHS' => [ + 'A3' => 'BHS', + 'A2' => 'BS', + 'NUM' => '044', + 'TLD' => 'bs', + 'IOC' => null, + 'ISO3166-2' => 'BS', + 'UN' => null, + 'CURRENCY_CODE' => 'BSD', + 'TEL_CODE' => '1-242', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Bahamas", + 'NAME_fra' => "Bahamas", + 'NAME_deu' => "Bahamas", + ], + + 'BIH' => [ + 'A3' => 'BIH', + 'A2' => 'BA', + 'NUM' => '070', + 'TLD' => 'ba', + 'IOC' => null, + 'ISO3166-2' => 'BA', + 'UN' => null, + 'CURRENCY_CODE' => 'BAM', + 'TEL_CODE' => '387', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Southern Europe', + 'SUBREGION_CODE' => '039', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Bosnia and Herzegovina", + 'NAME_fra' => "Bosnie-Herzégovine", + 'NAME_deu' => "Bosnien und Herzegowina", + ], + + 'BLM' => [ + 'A3' => 'BLM', + 'A2' => 'BL', + 'NUM' => '652', + 'TLD' => 'gp', + 'IOC' => null, + 'ISO3166-2' => 'BL', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '590', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Saint Barthélemy", + 'NAME_fra' => "Saint-Barthélemy", + 'NAME_deu' => "Saint-Barthélemy", + ], + + 'BLR' => [ + 'A3' => 'BLR', + 'A2' => 'BY', + 'NUM' => '112', + 'TLD' => 'by', + 'IOC' => null, + 'ISO3166-2' => 'BY', + 'UN' => null, + 'CURRENCY_CODE' => 'BYR', + 'TEL_CODE' => '375', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Eastern Europe', + 'SUBREGION_CODE' => '151', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Belarus", + 'NAME_fra' => "Bélarus", + 'NAME_deu' => "Weissrussland", + ], + + 'BLZ' => [ + 'A3' => 'BLZ', + 'A2' => 'BZ', + 'NUM' => '084', + 'TLD' => 'bz', + 'IOC' => null, + 'ISO3166-2' => 'BZ', + 'UN' => null, + 'CURRENCY_CODE' => 'BZD', + 'TEL_CODE' => '501', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Central America', + 'INTERMEDIATEREGION_CODE' => '013', + 'NAME_eng' => "Belize", + 'NAME_fra' => "Belize", + 'NAME_deu' => "Belize", + ], + + 'BMU' => [ + 'A3' => 'BMU', + 'A2' => 'BM', + 'NUM' => '060', + 'TLD' => 'bm', + 'IOC' => null, + 'ISO3166-2' => 'BM', + 'UN' => null, + 'CURRENCY_CODE' => 'BMD', + 'TEL_CODE' => '1-441', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Northern America', + 'SUBREGION_CODE' => '021', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Bermuda", + 'NAME_fra' => "Bermudes", + 'NAME_deu' => "Bermuda", + ], + + 'BOL' => [ + 'A3' => 'BOL', + 'A2' => 'BO', + 'NUM' => '068', + 'TLD' => 'bo', + 'IOC' => null, + 'ISO3166-2' => 'BO', + 'UN' => null, + 'CURRENCY_CODE' => 'BOB', + 'TEL_CODE' => '591', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'South America', + 'INTERMEDIATEREGION_CODE' => '005', + 'NAME_eng' => "Bolivia, Plurinational State of", + 'NAME_fra' => "Bolivie, l'État Plurinational de", + 'NAME_deu' => "Bolivien", + ], + + 'BRA' => [ + 'A3' => 'BRA', + 'A2' => 'BR', + 'NUM' => '076', + 'TLD' => 'br', + 'IOC' => null, + 'ISO3166-2' => 'BR', + 'UN' => null, + 'CURRENCY_CODE' => 'BRL', + 'TEL_CODE' => '55', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'South America', + 'INTERMEDIATEREGION_CODE' => '005', + 'NAME_eng' => "Brazil", + 'NAME_fra' => "Brésil", + 'NAME_deu' => "Brasilien", + ], + + 'BRB' => [ + 'A3' => 'BRB', + 'A2' => 'BB', + 'NUM' => '052', + 'TLD' => 'bb', + 'IOC' => null, + 'ISO3166-2' => 'BB', + 'UN' => null, + 'CURRENCY_CODE' => 'BBD', + 'TEL_CODE' => '1-246', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Barbados", + 'NAME_fra' => "Barbade", + 'NAME_deu' => "Barbados", + ], + + 'BRN' => [ + 'A3' => 'BRN', + 'A2' => 'BN', + 'NUM' => '096', + 'TLD' => 'bn', + 'IOC' => null, + 'ISO3166-2' => 'BN', + 'UN' => null, + 'CURRENCY_CODE' => 'BND', + 'TEL_CODE' => '673', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'South-eastern Asia', + 'SUBREGION_CODE' => '035', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Brunei Darussalam", + 'NAME_fra' => "Brunei Darussalam", + 'NAME_deu' => "Brunei Darussalam", + ], + + 'BTN' => [ + 'A3' => 'BTN', + 'A2' => 'BT', + 'NUM' => '064', + 'TLD' => 'bt', + 'IOC' => null, + 'ISO3166-2' => 'BT', + 'UN' => null, + 'CURRENCY_CODE' => 'INR', + 'TEL_CODE' => '975', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Southern Asia', + 'SUBREGION_CODE' => '034', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Bhutan", + 'NAME_fra' => "Bhoutan", + 'NAME_deu' => "Bhutan", + ], + + 'BVT' => [ + 'A3' => 'BVT', + 'A2' => 'BV', + 'NUM' => '074', + 'TLD' => 'bv', + 'IOC' => null, + 'ISO3166-2' => 'BV', + 'UN' => null, + 'CURRENCY_CODE' => 'NOK', + 'TEL_CODE' => '47', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'South America', + 'INTERMEDIATEREGION_CODE' => '005', + 'NAME_eng' => "Bouvet Island", + 'NAME_fra' => "Bouvet, Île", + 'NAME_deu' => "Bouvetinsel", + ], + + 'BWA' => [ + 'A3' => 'BWA', + 'A2' => 'BW', + 'NUM' => '072', + 'TLD' => 'bw', + 'IOC' => null, + 'ISO3166-2' => 'BW', + 'UN' => null, + 'CURRENCY_CODE' => 'BWP', + 'TEL_CODE' => '267', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Southern Africa', + 'INTERMEDIATEREGION_CODE' => '018', + 'NAME_eng' => "Botswana", + 'NAME_fra' => "Botswana", + 'NAME_deu' => "Botswana", + ], + + 'CAF' => [ + 'A3' => 'CAF', + 'A2' => 'CF', + 'NUM' => '140', + 'TLD' => 'cf', + 'IOC' => null, + 'ISO3166-2' => 'CF', + 'UN' => null, + 'CURRENCY_CODE' => 'XAF', + 'TEL_CODE' => '236', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Middle Africa', + 'INTERMEDIATEREGION_CODE' => '017', + 'NAME_eng' => "Central African Republic", + 'NAME_fra' => "Centrafricaine, République", + 'NAME_deu' => "Zentralafrikanische Republik", + ], + + 'CAN' => [ + 'A3' => 'CAN', + 'A2' => 'CA', + 'NUM' => '124', + 'TLD' => 'ca', + 'IOC' => null, + 'ISO3166-2' => 'CA', + 'UN' => null, + 'CURRENCY_CODE' => 'CAD', + 'TEL_CODE' => '1', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Northern America', + 'SUBREGION_CODE' => '021', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Canada", + 'NAME_fra' => "Canada", + 'NAME_deu' => "Kanada", + ], + + 'CCK' => [ + 'A3' => 'CCK', + 'A2' => 'CC', + 'NUM' => '166', + 'TLD' => 'cc', + 'IOC' => null, + 'ISO3166-2' => 'CC', + 'UN' => null, + 'CURRENCY_CODE' => 'AUD', + 'TEL_CODE' => '61', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Australia and New Zealand', + 'SUBREGION_CODE' => '053', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Cocos (Keeling) Islands", + 'NAME_fra' => "Cocos (Keeling), Îles", + 'NAME_deu' => "Kokosinseln", + ], + + 'CHE' => [ + 'A3' => 'CHE', + 'A2' => 'CH', + 'NUM' => '756', + 'TLD' => 'ch', + 'IOC' => null, + 'ISO3166-2' => 'CH', + 'UN' => null, + 'CURRENCY_CODE' => 'CHF', + 'TEL_CODE' => '41', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Western Europe', + 'SUBREGION_CODE' => '155', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Switzerland", + 'NAME_fra' => "Suisse", + 'NAME_deu' => "Schweiz", + ], + + 'CHL' => [ + 'A3' => 'CHL', + 'A2' => 'CL', + 'NUM' => '152', + 'TLD' => 'cl', + 'IOC' => null, + 'ISO3166-2' => 'CL', + 'UN' => null, + 'CURRENCY_CODE' => 'CLP', + 'TEL_CODE' => '56', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'South America', + 'INTERMEDIATEREGION_CODE' => '005', + 'NAME_eng' => "Chile", + 'NAME_fra' => "Chili", + 'NAME_deu' => "Chile", + ], + + 'CHN' => [ + 'A3' => 'CHN', + 'A2' => 'CN', + 'NUM' => '156', + 'TLD' => 'cn', + 'IOC' => null, + 'ISO3166-2' => 'CN', + 'UN' => null, + 'CURRENCY_CODE' => 'CNY', + 'TEL_CODE' => '86', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Eastern Asia', + 'SUBREGION_CODE' => '030', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "China", + 'NAME_fra' => "Chine", + 'NAME_deu' => "China", + ], + + 'CIV' => [ + 'A3' => 'CIV', + 'A2' => 'CI', + 'NUM' => '384', + 'TLD' => 'ci', + 'IOC' => null, + 'ISO3166-2' => 'CI', + 'UN' => null, + 'CURRENCY_CODE' => 'XOF', + 'TEL_CODE' => '225', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Western Africa', + 'INTERMEDIATEREGION_CODE' => '011', + 'NAME_eng' => "Côte d'Ivoire", + 'NAME_fra' => "Côte d'Ivoire", + 'NAME_deu' => "Côte d'Ivoire (Elfenbeinküste)", + ], + + 'CMR' => [ + 'A3' => 'CMR', + 'A2' => 'CM', + 'NUM' => '120', + 'TLD' => 'cm', + 'IOC' => null, + 'ISO3166-2' => 'CM', + 'UN' => null, + 'CURRENCY_CODE' => 'XAF', + 'TEL_CODE' => '237', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Middle Africa', + 'INTERMEDIATEREGION_CODE' => '017', + 'NAME_eng' => "Cameroon", + 'NAME_fra' => "Cameroun", + 'NAME_deu' => "Kamerun", + ], + + 'COD' => [ + 'A3' => 'COD', + 'A2' => 'CD', + 'NUM' => '180', + 'TLD' => 'cd', + 'IOC' => null, + 'ISO3166-2' => 'CD', + 'UN' => null, + 'CURRENCY_CODE' => null, + 'TEL_CODE' => '243', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Middle Africa', + 'INTERMEDIATEREGION_CODE' => '017', + 'NAME_eng' => "Congo, the Democratic Republic of the", + 'NAME_fra' => "Congo, la République Démocratique du", + 'NAME_deu' => "Kongo, Demokratische Republik (ehem. Zaire)", + ], + + 'COG' => [ + 'A3' => 'COG', + 'A2' => 'CG', + 'NUM' => '178', + 'TLD' => 'cg', + 'IOC' => null, + 'ISO3166-2' => 'CG', + 'UN' => null, + 'CURRENCY_CODE' => 'XAF', + 'TEL_CODE' => '242', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Middle Africa', + 'INTERMEDIATEREGION_CODE' => '017', + 'NAME_eng' => "Congo", + 'NAME_fra' => "Congo", + 'NAME_deu' => "Republik Kongo", + ], + + 'COK' => [ + 'A3' => 'COK', + 'A2' => 'CK', + 'NUM' => '184', + 'TLD' => 'ck', + 'IOC' => null, + 'ISO3166-2' => 'CK', + 'UN' => null, + 'CURRENCY_CODE' => 'NZD', + 'TEL_CODE' => '682', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Polynesia', + 'SUBREGION_CODE' => '061', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Cook Islands", + 'NAME_fra' => "Cook, Îles", + 'NAME_deu' => "Cookinseln", + ], + + 'COL' => [ + 'A3' => 'COL', + 'A2' => 'CO', + 'NUM' => '170', + 'TLD' => 'co', + 'IOC' => null, + 'ISO3166-2' => 'CO', + 'UN' => null, + 'CURRENCY_CODE' => 'COP', + 'TEL_CODE' => '57', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'South America', + 'INTERMEDIATEREGION_CODE' => '005', + 'NAME_eng' => "Colombia", + 'NAME_fra' => "Colombie", + 'NAME_deu' => "Kolumbien", + ], + + 'COM' => [ + 'A3' => 'COM', + 'A2' => 'KM', + 'NUM' => '174', + 'TLD' => 'km', + 'IOC' => null, + 'ISO3166-2' => 'KM', + 'UN' => null, + 'CURRENCY_CODE' => 'KMF', + 'TEL_CODE' => '269', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "Comoros", + 'NAME_fra' => "Comores", + 'NAME_deu' => "Komoren", + ], + + 'CPV' => [ + 'A3' => 'CPV', + 'A2' => 'CV', + 'NUM' => '132', + 'TLD' => 'cv', + 'IOC' => null, + 'ISO3166-2' => 'CV', + 'UN' => null, + 'CURRENCY_CODE' => 'CVE', + 'TEL_CODE' => '238', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Western Africa', + 'INTERMEDIATEREGION_CODE' => '011', + 'NAME_eng' => "Cape Verde", + 'NAME_fra' => "Cap-Vert", + 'NAME_deu' => "Kap Verde", + ], + + 'CRI' => [ + 'A3' => 'CRI', + 'A2' => 'CR', + 'NUM' => '188', + 'TLD' => 'cr', + 'IOC' => null, + 'ISO3166-2' => 'CR', + 'UN' => null, + 'CURRENCY_CODE' => 'CRC', + 'TEL_CODE' => '506', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Central America', + 'INTERMEDIATEREGION_CODE' => '013', + 'NAME_eng' => "Costa Rica", + 'NAME_fra' => "Costa Rica", + 'NAME_deu' => "Costa Rica", + ], + + 'CUB' => [ + 'A3' => 'CUB', + 'A2' => 'CU', + 'NUM' => '192', + 'TLD' => 'cu', + 'IOC' => null, + 'ISO3166-2' => 'CU', + 'UN' => null, + 'CURRENCY_CODE' => 'CUP', + 'TEL_CODE' => '53', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Cuba", + 'NAME_fra' => "Cuba", + 'NAME_deu' => "Kuba", + ], + + 'CUW' => [ + 'A3' => 'CUW', + 'A2' => 'CW', + 'NUM' => '531', + 'TLD' => 'cw', + 'IOC' => null, + 'ISO3166-2' => 'CW', + 'UN' => null, + 'CURRENCY_CODE' => 'ANG', + 'TEL_CODE' => '599', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Curaçao", + 'NAME_fra' => "Curaçao", + 'NAME_deu' => "Curaçao", + ], + + 'CXR' => [ + 'A3' => 'CXR', + 'A2' => 'CX', + 'NUM' => '162', + 'TLD' => 'cx', + 'IOC' => null, + 'ISO3166-2' => 'CX', + 'UN' => null, + 'CURRENCY_CODE' => 'AUD', + 'TEL_CODE' => '61', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Australia and New Zealand', + 'SUBREGION_CODE' => '053', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Christmas Island", + 'NAME_fra' => "Christmas, Île", + 'NAME_deu' => "Weihnachtsinsel", + ], + + 'CYM' => [ + 'A3' => 'CYM', + 'A2' => 'KY', + 'NUM' => '136', + 'TLD' => 'ky', + 'IOC' => null, + 'ISO3166-2' => 'KY', + 'UN' => null, + 'CURRENCY_CODE' => 'KYD', + 'TEL_CODE' => '1-345', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Cayman Islands", + 'NAME_fra' => "Caïmans, Îles", + 'NAME_deu' => "Kaimaninseln", + ], + + 'CYP' => [ + 'A3' => 'CYP', + 'A2' => 'CY', + 'NUM' => '196', + 'TLD' => 'cy', + 'IOC' => null, + 'ISO3166-2' => 'CY', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '357', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Western Asia', + 'SUBREGION_CODE' => '145', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Cyprus", + 'NAME_fra' => "Chypre", + 'NAME_deu' => "Zypern", + ], + + 'CZE' => [ + 'A3' => 'CZE', + 'A2' => 'CZ', + 'NUM' => '203', + 'TLD' => 'cz', + 'IOC' => null, + 'ISO3166-2' => 'CZ', + 'UN' => null, + 'CURRENCY_CODE' => 'CZK', + 'TEL_CODE' => '420', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Eastern Europe', + 'SUBREGION_CODE' => '151', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Czech Republic", + 'NAME_fra' => "Tchèque, République", + 'NAME_deu' => "Tschechische Republik", + ], + + 'DEU' => [ + 'A3' => 'DEU', + 'A2' => 'DE', + 'NUM' => '276', + 'TLD' => 'de', + 'IOC' => null, + 'ISO3166-2' => 'DE', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '49', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Western Europe', + 'SUBREGION_CODE' => '155', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Germany", + 'NAME_fra' => "Allemagne", + 'NAME_deu' => "Deutschland", + ], + + 'DJI' => [ + 'A3' => 'DJI', + 'A2' => 'DJ', + 'NUM' => '262', + 'TLD' => 'dj', + 'IOC' => null, + 'ISO3166-2' => 'DJ', + 'UN' => null, + 'CURRENCY_CODE' => 'DJF', + 'TEL_CODE' => '253', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "Djibouti", + 'NAME_fra' => "Djibouti", + 'NAME_deu' => "Dschibuti", + ], + + 'DMA' => [ + 'A3' => 'DMA', + 'A2' => 'DM', + 'NUM' => '212', + 'TLD' => 'dm', + 'IOC' => null, + 'ISO3166-2' => 'DM', + 'UN' => null, + 'CURRENCY_CODE' => 'XCD', + 'TEL_CODE' => '1-767', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Dominica", + 'NAME_fra' => "Dominique", + 'NAME_deu' => "Dominica", + ], + + 'DNK' => [ + 'A3' => 'DNK', + 'A2' => 'DK', + 'NUM' => '208', + 'TLD' => 'dk', + 'IOC' => null, + 'ISO3166-2' => 'DK', + 'UN' => null, + 'CURRENCY_CODE' => 'DKK', + 'TEL_CODE' => '45', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Northern Europe', + 'SUBREGION_CODE' => '154', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Denmark", + 'NAME_fra' => "Danemark", + 'NAME_deu' => "Dänemark", + ], + + 'DOM' => [ + 'A3' => 'DOM', + 'A2' => 'DO', + 'NUM' => '214', + 'TLD' => 'do', + 'IOC' => null, + 'ISO3166-2' => 'DO', + 'UN' => null, + 'CURRENCY_CODE' => 'DOP', + 'TEL_CODE' => '1-809,1-829,1-849', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Dominican Republic", + 'NAME_fra' => "Dominicaine, République", + 'NAME_deu' => "Dominikanische Republik", + ], + + 'DZA' => [ + 'A3' => 'DZA', + 'A2' => 'DZ', + 'NUM' => '012', + 'TLD' => 'dz', + 'IOC' => null, + 'ISO3166-2' => 'DZ', + 'UN' => null, + 'CURRENCY_CODE' => 'DZD', + 'TEL_CODE' => '213', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Northern Africa', + 'SUBREGION_CODE' => '015', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Algeria", + 'NAME_fra' => "Algérie", + 'NAME_deu' => "Algerien", + ], + + 'ECU' => [ + 'A3' => 'ECU', + 'A2' => 'EC', + 'NUM' => '218', + 'TLD' => 'ec', + 'IOC' => null, + 'ISO3166-2' => 'EC', + 'UN' => null, + 'CURRENCY_CODE' => 'USD', + 'TEL_CODE' => '593', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'South America', + 'INTERMEDIATEREGION_CODE' => '005', + 'NAME_eng' => "Ecuador", + 'NAME_fra' => "Équateur", + 'NAME_deu' => "Ecuador", + ], + + 'EGY' => [ + 'A3' => 'EGY', + 'A2' => 'EG', + 'NUM' => '818', + 'TLD' => 'eg', + 'IOC' => null, + 'ISO3166-2' => 'EG', + 'UN' => null, + 'CURRENCY_CODE' => 'EGP', + 'TEL_CODE' => '20', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Northern Africa', + 'SUBREGION_CODE' => '015', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Egypt", + 'NAME_fra' => "Égypte", + 'NAME_deu' => "Ägypten", + ], + + 'ERI' => [ + 'A3' => 'ERI', + 'A2' => 'ER', + 'NUM' => '232', + 'TLD' => 'er', + 'IOC' => null, + 'ISO3166-2' => 'ER', + 'UN' => null, + 'CURRENCY_CODE' => 'ERN', + 'TEL_CODE' => '291', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "Eritrea", + 'NAME_fra' => "Érythrée", + 'NAME_deu' => "Eritrea", + ], + + 'ESH' => [ + 'A3' => 'ESH', + 'A2' => 'EH', + 'NUM' => '732', + 'TLD' => 'eh', + 'IOC' => null, + 'ISO3166-2' => 'EH', + 'UN' => null, + 'CURRENCY_CODE' => 'MAD', + 'TEL_CODE' => '212', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Northern Africa', + 'SUBREGION_CODE' => '015', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Western Sahara", + 'NAME_fra' => "Sahara Occidental", + 'NAME_deu' => "Westsahara", + ], + + 'ESP' => [ + 'A3' => 'ESP', + 'A2' => 'ES', + 'NUM' => '724', + 'TLD' => 'es', + 'IOC' => null, + 'ISO3166-2' => 'ES', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '34', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Southern Europe', + 'SUBREGION_CODE' => '039', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Spain", + 'NAME_fra' => "Espagne", + 'NAME_deu' => "Spanien", + ], + + 'EST' => [ + 'A3' => 'EST', + 'A2' => 'EE', + 'NUM' => '233', + 'TLD' => 'ee', + 'IOC' => null, + 'ISO3166-2' => 'EE', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '372', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Northern Europe', + 'SUBREGION_CODE' => '154', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Estonia", + 'NAME_fra' => "Estonie", + 'NAME_deu' => "Estland", + ], + + 'ETH' => [ + 'A3' => 'ETH', + 'A2' => 'ET', + 'NUM' => '231', + 'TLD' => 'et', + 'IOC' => null, + 'ISO3166-2' => 'ET', + 'UN' => null, + 'CURRENCY_CODE' => 'ETB', + 'TEL_CODE' => '251', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "Ethiopia", + 'NAME_fra' => "Éthiopie", + 'NAME_deu' => "Äthiopien", + ], + + 'FIN' => [ + 'A3' => 'FIN', + 'A2' => 'FI', + 'NUM' => '246', + 'TLD' => 'fi', + 'IOC' => null, + 'ISO3166-2' => 'FI', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '358', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Northern Europe', + 'SUBREGION_CODE' => '154', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Finland", + 'NAME_fra' => "Finlande", + 'NAME_deu' => "Finnland", + ], + + 'FJI' => [ + 'A3' => 'FJI', + 'A2' => 'FJ', + 'NUM' => '242', + 'TLD' => 'fj', + 'IOC' => null, + 'ISO3166-2' => 'FJ', + 'UN' => null, + 'CURRENCY_CODE' => 'FJD', + 'TEL_CODE' => '679', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Melanesia', + 'SUBREGION_CODE' => '054', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Fiji", + 'NAME_fra' => "Fidji", + 'NAME_deu' => "Fidschi", + ], + + 'FLK' => [ + 'A3' => 'FLK', + 'A2' => 'FK', + 'NUM' => '238', + 'TLD' => 'fk', + 'IOC' => null, + 'ISO3166-2' => 'FK', + 'UN' => null, + 'CURRENCY_CODE' => 'FKP', + 'TEL_CODE' => '500', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'South America', + 'INTERMEDIATEREGION_CODE' => '005', + 'NAME_eng' => "Falkland Islands (Malvinas)", + 'NAME_fra' => "Falkland, Îles (Malvinas)", + 'NAME_deu' => "Falklandinseln", + ], + + 'FRA' => [ + 'A3' => 'FRA', + 'A2' => 'FR', + 'NUM' => '250', + 'TLD' => 'fr', + 'IOC' => null, + 'ISO3166-2' => 'FR', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '33', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Western Europe', + 'SUBREGION_CODE' => '155', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "France", + 'NAME_fra' => "France", + 'NAME_deu' => "Frankreich", + ], + + 'FRO' => [ + 'A3' => 'FRO', + 'A2' => 'FO', + 'NUM' => '234', + 'TLD' => 'fo', + 'IOC' => null, + 'ISO3166-2' => 'FO', + 'UN' => null, + 'CURRENCY_CODE' => 'DKK', + 'TEL_CODE' => '298', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Northern Europe', + 'SUBREGION_CODE' => '154', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Faroe Islands", + 'NAME_fra' => "Féroé, Îles", + 'NAME_deu' => "Färöer", + ], + + 'FSM' => [ + 'A3' => 'FSM', + 'A2' => 'FM', + 'NUM' => '583', + 'TLD' => 'fm', + 'IOC' => null, + 'ISO3166-2' => 'FM', + 'UN' => null, + 'CURRENCY_CODE' => 'USD', + 'TEL_CODE' => '691', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Micronesia', + 'SUBREGION_CODE' => '057', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Micronesia, Federated States of", + 'NAME_fra' => "Micronésie, États Fédérés de", + 'NAME_deu' => "Mikronesien", + ], + + 'GAB' => [ + 'A3' => 'GAB', + 'A2' => 'GA', + 'NUM' => '266', + 'TLD' => 'ga', + 'IOC' => null, + 'ISO3166-2' => 'GA', + 'UN' => null, + 'CURRENCY_CODE' => 'XAF', + 'TEL_CODE' => '241', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Middle Africa', + 'INTERMEDIATEREGION_CODE' => '017', + 'NAME_eng' => "Gabon", + 'NAME_fra' => "Gabon", + 'NAME_deu' => "Gabun", + ], + + 'GBR' => [ + 'A3' => 'GBR', + 'A2' => 'GB', + 'NUM' => '826', + 'TLD' => 'uk', + 'IOC' => null, + 'ISO3166-2' => 'GB', + 'UN' => null, + 'CURRENCY_CODE' => 'GBP', + 'TEL_CODE' => '44', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Northern Europe', + 'SUBREGION_CODE' => '154', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "United Kingdom", + 'NAME_fra' => "Royaume-Uni", + 'NAME_deu' => "Vereinigtes Königreich Grossbritannien und Nordirland", + ], + + 'GEO' => [ + 'A3' => 'GEO', + 'A2' => 'GE', + 'NUM' => '268', + 'TLD' => 'ge', + 'IOC' => null, + 'ISO3166-2' => 'GE', + 'UN' => null, + 'CURRENCY_CODE' => 'GEL', + 'TEL_CODE' => '995', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Western Asia', + 'SUBREGION_CODE' => '145', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Georgia", + 'NAME_fra' => "Géorgie", + 'NAME_deu' => "Georgien", + ], + + 'GGY' => [ + 'A3' => 'GGY', + 'A2' => 'GG', + 'NUM' => '831', + 'TLD' => 'gg', + 'IOC' => null, + 'ISO3166-2' => 'GG', + 'UN' => null, + 'CURRENCY_CODE' => 'GBP', + 'TEL_CODE' => '44', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Northern Europe', + 'SUBREGION_CODE' => '154', + 'INTERMEDIATEREGION' => 'Channel Islands', + 'INTERMEDIATEREGION_CODE' => '830', + 'NAME_eng' => "Guernsey", + 'NAME_fra' => "Guernesey", + 'NAME_deu' => "Guernsey (Kanalinsel)", + ], + + 'GHA' => [ + 'A3' => 'GHA', + 'A2' => 'GH', + 'NUM' => '288', + 'TLD' => 'gh', + 'IOC' => null, + 'ISO3166-2' => 'GH', + 'UN' => null, + 'CURRENCY_CODE' => 'GHS', + 'TEL_CODE' => '233', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Western Africa', + 'INTERMEDIATEREGION_CODE' => '011', + 'NAME_eng' => "Ghana", + 'NAME_fra' => "Ghana", + 'NAME_deu' => "Ghana", + ], + + 'GIB' => [ + 'A3' => 'GIB', + 'A2' => 'GI', + 'NUM' => '292', + 'TLD' => 'gi', + 'IOC' => null, + 'ISO3166-2' => 'GI', + 'UN' => null, + 'CURRENCY_CODE' => 'GIP', + 'TEL_CODE' => '350', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Southern Europe', + 'SUBREGION_CODE' => '039', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Gibraltar", + 'NAME_fra' => "Gibraltar", + 'NAME_deu' => "Gibraltar", + ], + + 'GIN' => [ + 'A3' => 'GIN', + 'A2' => 'GN', + 'NUM' => '324', + 'TLD' => 'gn', + 'IOC' => null, + 'ISO3166-2' => 'GN', + 'UN' => null, + 'CURRENCY_CODE' => 'GNF', + 'TEL_CODE' => '224', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Western Africa', + 'INTERMEDIATEREGION_CODE' => '011', + 'NAME_eng' => "Guinea", + 'NAME_fra' => "Guinée", + 'NAME_deu' => "Guinea", + ], + + 'GLP' => [ + 'A3' => 'GLP', + 'A2' => 'GP', + 'NUM' => '312', + 'TLD' => 'gp', + 'IOC' => null, + 'ISO3166-2' => 'GP', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '590', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Guadeloupe", + 'NAME_fra' => "Guadeloupe", + 'NAME_deu' => "Guadeloupe", + ], + + 'GMB' => [ + 'A3' => 'GMB', + 'A2' => 'GM', + 'NUM' => '270', + 'TLD' => 'gm', + 'IOC' => null, + 'ISO3166-2' => 'GM', + 'UN' => null, + 'CURRENCY_CODE' => 'GMD', + 'TEL_CODE' => '220', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Western Africa', + 'INTERMEDIATEREGION_CODE' => '011', + 'NAME_eng' => "Gambia", + 'NAME_fra' => "Gambie", + 'NAME_deu' => "Gambia", + ], + + 'GNB' => [ + 'A3' => 'GNB', + 'A2' => 'GW', + 'NUM' => '624', + 'TLD' => 'gw', + 'IOC' => null, + 'ISO3166-2' => 'GW', + 'UN' => null, + 'CURRENCY_CODE' => 'XOF', + 'TEL_CODE' => '245', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Western Africa', + 'INTERMEDIATEREGION_CODE' => '011', + 'NAME_eng' => "Guinea-Bissau", + 'NAME_fra' => "Guinée-Bissau", + 'NAME_deu' => "Guinea-Bissau", + ], + + 'GNQ' => [ + 'A3' => 'GNQ', + 'A2' => 'GQ', + 'NUM' => '226', + 'TLD' => 'gq', + 'IOC' => null, + 'ISO3166-2' => 'GQ', + 'UN' => null, + 'CURRENCY_CODE' => 'XAF', + 'TEL_CODE' => '240', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Middle Africa', + 'INTERMEDIATEREGION_CODE' => '017', + 'NAME_eng' => "Equatorial Guinea", + 'NAME_fra' => "Guinée Équatoriale", + 'NAME_deu' => "Äquatorialguinea", + ], + + 'GRC' => [ + 'A3' => 'GRC', + 'A2' => 'GR', + 'NUM' => '300', + 'TLD' => 'gr', + 'IOC' => null, + 'ISO3166-2' => 'GR', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '30', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Southern Europe', + 'SUBREGION_CODE' => '039', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Greece", + 'NAME_fra' => "Grèce", + 'NAME_deu' => "Griechenland", + ], + + 'GRD' => [ + 'A3' => 'GRD', + 'A2' => 'GD', + 'NUM' => '308', + 'TLD' => 'gd', + 'IOC' => null, + 'ISO3166-2' => 'GD', + 'UN' => null, + 'CURRENCY_CODE' => 'XCD', + 'TEL_CODE' => '1-473', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Grenada", + 'NAME_fra' => "Grenade", + 'NAME_deu' => "Grenada", + ], + + 'GRL' => [ + 'A3' => 'GRL', + 'A2' => 'GL', + 'NUM' => '304', + 'TLD' => 'gl', + 'IOC' => null, + 'ISO3166-2' => 'GL', + 'UN' => null, + 'CURRENCY_CODE' => 'DKK', + 'TEL_CODE' => '299', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Northern America', + 'SUBREGION_CODE' => '021', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Greenland", + 'NAME_fra' => "Groenland", + 'NAME_deu' => "Grönland", + ], + + 'GTM' => [ + 'A3' => 'GTM', + 'A2' => 'GT', + 'NUM' => '320', + 'TLD' => 'gt', + 'IOC' => null, + 'ISO3166-2' => 'GT', + 'UN' => null, + 'CURRENCY_CODE' => 'GTQ', + 'TEL_CODE' => '502', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Central America', + 'INTERMEDIATEREGION_CODE' => '013', + 'NAME_eng' => "Guatemala", + 'NAME_fra' => "Guatemala", + 'NAME_deu' => "Guatemala", + ], + + 'GUF' => [ + 'A3' => 'GUF', + 'A2' => 'GF', + 'NUM' => '254', + 'TLD' => 'gf', + 'IOC' => null, + 'ISO3166-2' => 'GF', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '594', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'South America', + 'INTERMEDIATEREGION_CODE' => '005', + 'NAME_eng' => "French Guiana", + 'NAME_fra' => "Guyane Française", + 'NAME_deu' => "Französisch-Guayana", + ], + + 'GUM' => [ + 'A3' => 'GUM', + 'A2' => 'GU', + 'NUM' => '316', + 'TLD' => 'gu', + 'IOC' => null, + 'ISO3166-2' => 'GU', + 'UN' => null, + 'CURRENCY_CODE' => 'USD', + 'TEL_CODE' => '1-671', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Micronesia', + 'SUBREGION_CODE' => '057', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Guam", + 'NAME_fra' => "Guam", + 'NAME_deu' => "Guam", + ], + + 'GUY' => [ + 'A3' => 'GUY', + 'A2' => 'GY', + 'NUM' => '328', + 'TLD' => 'gy', + 'IOC' => null, + 'ISO3166-2' => 'GY', + 'UN' => null, + 'CURRENCY_CODE' => 'GYD', + 'TEL_CODE' => '592', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'South America', + 'INTERMEDIATEREGION_CODE' => '005', + 'NAME_eng' => "Guyana", + 'NAME_fra' => "Guyana", + 'NAME_deu' => "Guyana", + ], + + 'HKG' => [ + 'A3' => 'HKG', + 'A2' => 'HK', + 'NUM' => '344', + 'TLD' => 'hk', + 'IOC' => null, + 'ISO3166-2' => 'HK', + 'UN' => null, + 'CURRENCY_CODE' => 'HKD', + 'TEL_CODE' => '852', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Eastern Asia', + 'SUBREGION_CODE' => '030', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Hong Kong", + 'NAME_fra' => "Hong Kong", + 'NAME_deu' => "Hongkong", + ], + + 'HMD' => [ + 'A3' => 'HMD', + 'A2' => 'HM', + 'NUM' => '334', + 'TLD' => 'hm', + 'IOC' => null, + 'ISO3166-2' => 'HM', + 'UN' => null, + 'CURRENCY_CODE' => 'AUD', + 'TEL_CODE' => '672', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Australia and New Zealand', + 'SUBREGION_CODE' => '053', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Heard Island and McDonald Islands", + 'NAME_fra' => "Heard-Et-Îles Macdonald, Île", + 'NAME_deu' => "Heard und McDonaldinseln", + ], + + 'HND' => [ + 'A3' => 'HND', + 'A2' => 'HN', + 'NUM' => '340', + 'TLD' => 'hn', + 'IOC' => null, + 'ISO3166-2' => 'HN', + 'UN' => null, + 'CURRENCY_CODE' => 'HNL', + 'TEL_CODE' => '504', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Central America', + 'INTERMEDIATEREGION_CODE' => '013', + 'NAME_eng' => "Honduras", + 'NAME_fra' => "Honduras", + 'NAME_deu' => "Honduras", + ], + + 'HRV' => [ + 'A3' => 'HRV', + 'A2' => 'HR', + 'NUM' => '191', + 'TLD' => 'hr', + 'IOC' => null, + 'ISO3166-2' => 'HR', + 'UN' => null, + 'CURRENCY_CODE' => 'HRK', + 'TEL_CODE' => '385', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Southern Europe', + 'SUBREGION_CODE' => '039', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Croatia", + 'NAME_fra' => "Croatie", + 'NAME_deu' => "Kroatien", + ], + + 'HTI' => [ + 'A3' => 'HTI', + 'A2' => 'HT', + 'NUM' => '332', + 'TLD' => 'ht', + 'IOC' => null, + 'ISO3166-2' => 'HT', + 'UN' => null, + 'CURRENCY_CODE' => 'USD', + 'TEL_CODE' => '509', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Haiti", + 'NAME_fra' => "Haïti", + 'NAME_deu' => "Haiti", + ], + + 'HUN' => [ + 'A3' => 'HUN', + 'A2' => 'HU', + 'NUM' => '348', + 'TLD' => 'hu', + 'IOC' => null, + 'ISO3166-2' => 'HU', + 'UN' => null, + 'CURRENCY_CODE' => 'HUF', + 'TEL_CODE' => '36', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Eastern Europe', + 'SUBREGION_CODE' => '151', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Hungary", + 'NAME_fra' => "Hongrie", + 'NAME_deu' => "Ungarn", + ], + + 'IDN' => [ + 'A3' => 'IDN', + 'A2' => 'ID', + 'NUM' => '360', + 'TLD' => 'id', + 'IOC' => null, + 'ISO3166-2' => 'ID', + 'UN' => null, + 'CURRENCY_CODE' => 'IDR', + 'TEL_CODE' => '62', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'South-eastern Asia', + 'SUBREGION_CODE' => '035', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Indonesia", + 'NAME_fra' => "Indonésie", + 'NAME_deu' => "Indonesien", + ], + + 'IMN' => [ + 'A3' => 'IMN', + 'A2' => 'IM', + 'NUM' => '833', + 'TLD' => 'im', + 'IOC' => null, + 'ISO3166-2' => 'IM', + 'UN' => null, + 'CURRENCY_CODE' => 'GBP', + 'TEL_CODE' => '44', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Northern Europe', + 'SUBREGION_CODE' => '154', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Isle of Man", + 'NAME_fra' => "Île de Man", + 'NAME_deu' => "Insel Man", + ], + + 'IND' => [ + 'A3' => 'IND', + 'A2' => 'IN', + 'NUM' => '356', + 'TLD' => 'in', + 'IOC' => null, + 'ISO3166-2' => 'IN', + 'UN' => null, + 'CURRENCY_CODE' => 'INR', + 'TEL_CODE' => '91', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Southern Asia', + 'SUBREGION_CODE' => '034', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "India", + 'NAME_fra' => "Inde", + 'NAME_deu' => "Indien", + ], + + 'IOT' => [ + 'A3' => 'IOT', + 'A2' => 'IO', + 'NUM' => '086', + 'TLD' => 'io', + 'IOC' => null, + 'ISO3166-2' => 'IO', + 'UN' => null, + 'CURRENCY_CODE' => 'USD', + 'TEL_CODE' => '246', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "British Indian Ocean Territory", + 'NAME_fra' => "Océan Indien, Territoire Britannique de l'", + 'NAME_deu' => "Britisches Territorium im Indischen Ozean", + ], + + 'IRL' => [ + 'A3' => 'IRL', + 'A2' => 'IE', + 'NUM' => '372', + 'TLD' => 'ie', + 'IOC' => null, + 'ISO3166-2' => 'IE', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '353', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Northern Europe', + 'SUBREGION_CODE' => '154', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Ireland", + 'NAME_fra' => "Irlande", + 'NAME_deu' => "Irland", + ], + + 'IRN' => [ + 'A3' => 'IRN', + 'A2' => 'IR', + 'NUM' => '364', + 'TLD' => 'ir', + 'IOC' => null, + 'ISO3166-2' => 'IR', + 'UN' => null, + 'CURRENCY_CODE' => 'IRR', + 'TEL_CODE' => '98', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Southern Asia', + 'SUBREGION_CODE' => '034', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Iran, Islamic Republic of", + 'NAME_fra' => "Iran, République Islamique d'", + 'NAME_deu' => "Iran, Islamische Republik", + ], + + 'IRQ' => [ + 'A3' => 'IRQ', + 'A2' => 'IQ', + 'NUM' => '368', + 'TLD' => 'iq', + 'IOC' => null, + 'ISO3166-2' => 'IQ', + 'UN' => null, + 'CURRENCY_CODE' => 'IQD', + 'TEL_CODE' => '964', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Western Asia', + 'SUBREGION_CODE' => '145', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Iraq", + 'NAME_fra' => "Iraq", + 'NAME_deu' => "Irak", + ], + + 'ISL' => [ + 'A3' => 'ISL', + 'A2' => 'IS', + 'NUM' => '352', + 'TLD' => 'is', + 'IOC' => null, + 'ISO3166-2' => 'IS', + 'UN' => null, + 'CURRENCY_CODE' => 'ISK', + 'TEL_CODE' => '354', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Northern Europe', + 'SUBREGION_CODE' => '154', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Iceland", + 'NAME_fra' => "Islande", + 'NAME_deu' => "Island", + ], + + 'ISR' => [ + 'A3' => 'ISR', + 'A2' => 'IL', + 'NUM' => '376', + 'TLD' => 'il', + 'IOC' => null, + 'ISO3166-2' => 'IL', + 'UN' => null, + 'CURRENCY_CODE' => 'ILS', + 'TEL_CODE' => '972', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Western Asia', + 'SUBREGION_CODE' => '145', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Israel", + 'NAME_fra' => "Israël", + 'NAME_deu' => "Israel", + ], + + 'ITA' => [ + 'A3' => 'ITA', + 'A2' => 'IT', + 'NUM' => '380', + 'TLD' => 'it', + 'IOC' => null, + 'ISO3166-2' => 'IT', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '39', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Southern Europe', + 'SUBREGION_CODE' => '039', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Italy", + 'NAME_fra' => "Italie", + 'NAME_deu' => "Italien", + ], + + 'JAM' => [ + 'A3' => 'JAM', + 'A2' => 'JM', + 'NUM' => '388', + 'TLD' => 'jm', + 'IOC' => null, + 'ISO3166-2' => 'JM', + 'UN' => null, + 'CURRENCY_CODE' => 'JMD', + 'TEL_CODE' => '1-876', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Jamaica", + 'NAME_fra' => "Jamaïque", + 'NAME_deu' => "Jamaika", + ], + + 'JEY' => [ + 'A3' => 'JEY', + 'A2' => 'JE', + 'NUM' => '832', + 'TLD' => 'je', + 'IOC' => null, + 'ISO3166-2' => 'JE', + 'UN' => null, + 'CURRENCY_CODE' => 'GBP', + 'TEL_CODE' => '44', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Northern Europe', + 'SUBREGION_CODE' => '154', + 'INTERMEDIATEREGION' => 'Channel Islands', + 'INTERMEDIATEREGION_CODE' => '830', + 'NAME_eng' => "Jersey", + 'NAME_fra' => "Jersey", + 'NAME_deu' => "Jersey (Kanalinsel)", + ], + + 'JOR' => [ + 'A3' => 'JOR', + 'A2' => 'JO', + 'NUM' => '400', + 'TLD' => 'jo', + 'IOC' => null, + 'ISO3166-2' => 'JO', + 'UN' => null, + 'CURRENCY_CODE' => 'JOD', + 'TEL_CODE' => '962', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Western Asia', + 'SUBREGION_CODE' => '145', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Jordan", + 'NAME_fra' => "Jordanie", + 'NAME_deu' => "Jordanien", + ], + + 'JPN' => [ + 'A3' => 'JPN', + 'A2' => 'JP', + 'NUM' => '392', + 'TLD' => 'jp', + 'IOC' => null, + 'ISO3166-2' => 'JP', + 'UN' => null, + 'CURRENCY_CODE' => 'JPY', + 'TEL_CODE' => '81', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Eastern Asia', + 'SUBREGION_CODE' => '030', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Japan", + 'NAME_fra' => "Japon", + 'NAME_deu' => "Japan", + ], + + 'KAZ' => [ + 'A3' => 'KAZ', + 'A2' => 'KZ', + 'NUM' => '398', + 'TLD' => 'kz', + 'IOC' => null, + 'ISO3166-2' => 'KZ', + 'UN' => null, + 'CURRENCY_CODE' => 'KZT', + 'TEL_CODE' => '7-6,7-7', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Central Asia', + 'SUBREGION_CODE' => '143', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Kazakhstan", + 'NAME_fra' => "Kazakhstan", + 'NAME_deu' => "Kasachstan", + ], + + 'KEN' => [ + 'A3' => 'KEN', + 'A2' => 'KE', + 'NUM' => '404', + 'TLD' => 'ke', + 'IOC' => null, + 'ISO3166-2' => 'KE', + 'UN' => null, + 'CURRENCY_CODE' => 'KES', + 'TEL_CODE' => '254', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "Kenya", + 'NAME_fra' => "Kenya", + 'NAME_deu' => "Kenia", + ], + + 'KGZ' => [ + 'A3' => 'KGZ', + 'A2' => 'KG', + 'NUM' => '417', + 'TLD' => 'kg', + 'IOC' => null, + 'ISO3166-2' => 'KG', + 'UN' => null, + 'CURRENCY_CODE' => 'KGS', + 'TEL_CODE' => '996', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Central Asia', + 'SUBREGION_CODE' => '143', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Kyrgyzstan", + 'NAME_fra' => "Kirghizistan", + 'NAME_deu' => "Kirgisistan", + ], + + 'KHM' => [ + 'A3' => 'KHM', + 'A2' => 'KH', + 'NUM' => '116', + 'TLD' => 'kh', + 'IOC' => null, + 'ISO3166-2' => 'KH', + 'UN' => null, + 'CURRENCY_CODE' => 'KHR', + 'TEL_CODE' => '855', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'South-eastern Asia', + 'SUBREGION_CODE' => '035', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Cambodia", + 'NAME_fra' => "Cambodge", + 'NAME_deu' => "Kambodscha", + ], + + 'KIR' => [ + 'A3' => 'KIR', + 'A2' => 'KI', + 'NUM' => '296', + 'TLD' => 'ki', + 'IOC' => null, + 'ISO3166-2' => 'KI', + 'UN' => null, + 'CURRENCY_CODE' => 'AUD', + 'TEL_CODE' => '686', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Micronesia', + 'SUBREGION_CODE' => '057', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Kiribati", + 'NAME_fra' => "Kiribati", + 'NAME_deu' => "Kiribati", + ], + + 'KNA' => [ + 'A3' => 'KNA', + 'A2' => 'KN', + 'NUM' => '659', + 'TLD' => 'kn', + 'IOC' => null, + 'ISO3166-2' => 'KN', + 'UN' => null, + 'CURRENCY_CODE' => 'XCD', + 'TEL_CODE' => '1-869', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Saint Kitts and Nevis", + 'NAME_fra' => "Saint-Kitts-Et-Nevis", + 'NAME_deu' => "St. Kitts und Nevis", + ], + + 'KOR' => [ + 'A3' => 'KOR', + 'A2' => 'KR', + 'NUM' => '410', + 'TLD' => 'kr', + 'IOC' => null, + 'ISO3166-2' => 'KR', + 'UN' => null, + 'CURRENCY_CODE' => 'KRW', + 'TEL_CODE' => '82', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Eastern Asia', + 'SUBREGION_CODE' => '030', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Korea, Republic of", + 'NAME_fra' => "Corée, République de", + 'NAME_deu' => "Korea, Republik (Südkorea)", + ], + + 'KWT' => [ + 'A3' => 'KWT', + 'A2' => 'KW', + 'NUM' => '414', + 'TLD' => 'kw', + 'IOC' => null, + 'ISO3166-2' => 'KW', + 'UN' => null, + 'CURRENCY_CODE' => 'KWD', + 'TEL_CODE' => '965', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Western Asia', + 'SUBREGION_CODE' => '145', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Kuwait", + 'NAME_fra' => "Koweït", + 'NAME_deu' => "Kuwait", + ], + + 'LAO' => [ + 'A3' => 'LAO', + 'A2' => 'LA', + 'NUM' => '418', + 'TLD' => 'la', + 'IOC' => null, + 'ISO3166-2' => 'LA', + 'UN' => null, + 'CURRENCY_CODE' => 'LAK', + 'TEL_CODE' => '856', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'South-eastern Asia', + 'SUBREGION_CODE' => '035', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Lao People's Democratic Republic", + 'NAME_fra' => "Lao, République Démocratique Populaire", + 'NAME_deu' => "Laos, Demokratische Volksrepublik", + ], + + 'LBN' => [ + 'A3' => 'LBN', + 'A2' => 'LB', + 'NUM' => '422', + 'TLD' => 'lb', + 'IOC' => null, + 'ISO3166-2' => 'LB', + 'UN' => null, + 'CURRENCY_CODE' => 'LBP', + 'TEL_CODE' => '961', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Western Asia', + 'SUBREGION_CODE' => '145', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Lebanon", + 'NAME_fra' => "Liban", + 'NAME_deu' => "Libanon", + ], + + 'LBR' => [ + 'A3' => 'LBR', + 'A2' => 'LR', + 'NUM' => '430', + 'TLD' => 'lr', + 'IOC' => null, + 'ISO3166-2' => 'LR', + 'UN' => null, + 'CURRENCY_CODE' => 'LRD', + 'TEL_CODE' => '231', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Western Africa', + 'INTERMEDIATEREGION_CODE' => '011', + 'NAME_eng' => "Liberia", + 'NAME_fra' => "Libéria", + 'NAME_deu' => "Liberia", + ], + + 'LBY' => [ + 'A3' => 'LBY', + 'A2' => 'LY', + 'NUM' => '434', + 'TLD' => 'ly', + 'IOC' => null, + 'ISO3166-2' => 'LY', + 'UN' => null, + 'CURRENCY_CODE' => 'LYD', + 'TEL_CODE' => '218', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Northern Africa', + 'SUBREGION_CODE' => '015', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Libya", + 'NAME_fra' => "Libye", + 'NAME_deu' => "Libyen", + ], + + 'LCA' => [ + 'A3' => 'LCA', + 'A2' => 'LC', + 'NUM' => '662', + 'TLD' => 'lc', + 'IOC' => null, + 'ISO3166-2' => 'LC', + 'UN' => null, + 'CURRENCY_CODE' => 'XCD', + 'TEL_CODE' => '1-758', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Saint Lucia", + 'NAME_fra' => "Sainte-Lucie", + 'NAME_deu' => "St. Lucia", + ], + + 'LIE' => [ + 'A3' => 'LIE', + 'A2' => 'LI', + 'NUM' => '438', + 'TLD' => 'li', + 'IOC' => null, + 'ISO3166-2' => 'LI', + 'UN' => null, + 'CURRENCY_CODE' => 'CHF', + 'TEL_CODE' => '423', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Western Europe', + 'SUBREGION_CODE' => '155', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Liechtenstein", + 'NAME_fra' => "Liechtenstein", + 'NAME_deu' => "Liechtenstein", + ], + + 'LKA' => [ + 'A3' => 'LKA', + 'A2' => 'LK', + 'NUM' => '144', + 'TLD' => 'lk', + 'IOC' => null, + 'ISO3166-2' => 'LK', + 'UN' => null, + 'CURRENCY_CODE' => 'LKR', + 'TEL_CODE' => '94', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Southern Asia', + 'SUBREGION_CODE' => '034', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Sri Lanka", + 'NAME_fra' => "Sri Lanka", + 'NAME_deu' => "Sri Lanka", + ], + + 'LSO' => [ + 'A3' => 'LSO', + 'A2' => 'LS', + 'NUM' => '426', + 'TLD' => 'ls', + 'IOC' => null, + 'ISO3166-2' => 'LS', + 'UN' => null, + 'CURRENCY_CODE' => 'ZAR', + 'TEL_CODE' => '266', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Southern Africa', + 'INTERMEDIATEREGION_CODE' => '018', + 'NAME_eng' => "Lesotho", + 'NAME_fra' => "Lesotho", + 'NAME_deu' => "Lesotho", + ], + + 'LTU' => [ + 'A3' => 'LTU', + 'A2' => 'LT', + 'NUM' => '440', + 'TLD' => 'lt', + 'IOC' => null, + 'ISO3166-2' => 'LT', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '370', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Northern Europe', + 'SUBREGION_CODE' => '154', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Lithuania", + 'NAME_fra' => "Lituanie", + 'NAME_deu' => "Litauen", + ], + + 'LUX' => [ + 'A3' => 'LUX', + 'A2' => 'LU', + 'NUM' => '442', + 'TLD' => 'lu', + 'IOC' => null, + 'ISO3166-2' => 'LU', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '352', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Western Europe', + 'SUBREGION_CODE' => '155', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Luxembourg", + 'NAME_fra' => "Luxembourg", + 'NAME_deu' => "Luxemburg", + ], + + 'LVA' => [ + 'A3' => 'LVA', + 'A2' => 'LV', + 'NUM' => '428', + 'TLD' => 'lv', + 'IOC' => null, + 'ISO3166-2' => 'LV', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '371', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Northern Europe', + 'SUBREGION_CODE' => '154', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Latvia", + 'NAME_fra' => "Lettonie", + 'NAME_deu' => "Lettland", + ], + + 'MAC' => [ + 'A3' => 'MAC', + 'A2' => 'MO', + 'NUM' => '446', + 'TLD' => 'mo', + 'IOC' => null, + 'ISO3166-2' => 'MO', + 'UN' => null, + 'CURRENCY_CODE' => 'MOP', + 'TEL_CODE' => '853', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Eastern Asia', + 'SUBREGION_CODE' => '030', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Macao", + 'NAME_fra' => "Macao", + 'NAME_deu' => "Macau", + ], + + 'MAF' => [ + 'A3' => 'MAF', + 'A2' => 'MF', + 'NUM' => '663', + 'TLD' => 'gp', + 'IOC' => null, + 'ISO3166-2' => 'MF', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '590', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Saint Martin (French part)", + 'NAME_fra' => "Saint-Martin(partie Française)", + 'NAME_deu' => "Saint-Martin (franz. Teil)", + ], + + 'MAR' => [ + 'A3' => 'MAR', + 'A2' => 'MA', + 'NUM' => '504', + 'TLD' => 'ma', + 'IOC' => null, + 'ISO3166-2' => 'MA', + 'UN' => null, + 'CURRENCY_CODE' => 'MAD', + 'TEL_CODE' => '212', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Northern Africa', + 'SUBREGION_CODE' => '015', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Morocco", + 'NAME_fra' => "Maroc", + 'NAME_deu' => "Marokko", + ], + + 'MCO' => [ + 'A3' => 'MCO', + 'A2' => 'MC', + 'NUM' => '492', + 'TLD' => 'mc', + 'IOC' => null, + 'ISO3166-2' => 'MC', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '377', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Western Europe', + 'SUBREGION_CODE' => '155', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Monaco", + 'NAME_fra' => "Monaco", + 'NAME_deu' => "Monaco", + ], + + 'MDA' => [ + 'A3' => 'MDA', + 'A2' => 'MD', + 'NUM' => '498', + 'TLD' => 'md', + 'IOC' => null, + 'ISO3166-2' => 'MD', + 'UN' => null, + 'CURRENCY_CODE' => 'MDL', + 'TEL_CODE' => '373', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Eastern Europe', + 'SUBREGION_CODE' => '151', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Moldova, Republic of", + 'NAME_fra' => "Moldova, République de", + 'NAME_deu' => "Moldawien (Republik Moldau)", + ], + + 'MDG' => [ + 'A3' => 'MDG', + 'A2' => 'MG', + 'NUM' => '450', + 'TLD' => 'mg', + 'IOC' => null, + 'ISO3166-2' => 'MG', + 'UN' => null, + 'CURRENCY_CODE' => 'MGA', + 'TEL_CODE' => '261', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "Madagascar", + 'NAME_fra' => "Madagascar", + 'NAME_deu' => "Madagaskar", + ], + + 'MDV' => [ + 'A3' => 'MDV', + 'A2' => 'MV', + 'NUM' => '462', + 'TLD' => 'mv', + 'IOC' => null, + 'ISO3166-2' => 'MV', + 'UN' => null, + 'CURRENCY_CODE' => 'MVR', + 'TEL_CODE' => '960', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Southern Asia', + 'SUBREGION_CODE' => '034', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Maldives", + 'NAME_fra' => "Maldives", + 'NAME_deu' => "Malediven", + ], + + 'MEX' => [ + 'A3' => 'MEX', + 'A2' => 'MX', + 'NUM' => '484', + 'TLD' => 'mx', + 'IOC' => null, + 'ISO3166-2' => 'MX', + 'UN' => null, + 'CURRENCY_CODE' => 'MXN', + 'TEL_CODE' => '52', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Central America', + 'INTERMEDIATEREGION_CODE' => '013', + 'NAME_eng' => "Mexico", + 'NAME_fra' => "Mexique", + 'NAME_deu' => "Mexiko", + ], + + 'MHL' => [ + 'A3' => 'MHL', + 'A2' => 'MH', + 'NUM' => '584', + 'TLD' => 'mh', + 'IOC' => null, + 'ISO3166-2' => 'MH', + 'UN' => null, + 'CURRENCY_CODE' => 'USD', + 'TEL_CODE' => '692', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Micronesia', + 'SUBREGION_CODE' => '057', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Marshall Islands", + 'NAME_fra' => "Marshall, Îles", + 'NAME_deu' => "Marshallinseln", + ], + + 'MKD' => [ + 'A3' => 'MKD', + 'A2' => 'MK', + 'NUM' => '807', + 'TLD' => 'mk', + 'IOC' => null, + 'ISO3166-2' => 'MK', + 'UN' => null, + 'CURRENCY_CODE' => 'MKD', + 'TEL_CODE' => '389', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Southern Europe', + 'SUBREGION_CODE' => '039', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Macedonia, the Former Yugoslav Republic of", + 'NAME_fra' => "Macédoine, l'Ex-république Yougoslave de", + 'NAME_deu' => "Mazedonien", + ], + + 'MLI' => [ + 'A3' => 'MLI', + 'A2' => 'ML', + 'NUM' => '466', + 'TLD' => 'ml', + 'IOC' => null, + 'ISO3166-2' => 'ML', + 'UN' => null, + 'CURRENCY_CODE' => 'XOF', + 'TEL_CODE' => '223', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Western Africa', + 'INTERMEDIATEREGION_CODE' => '011', + 'NAME_eng' => "Mali", + 'NAME_fra' => "Mali", + 'NAME_deu' => "Mali", + ], + + 'MLT' => [ + 'A3' => 'MLT', + 'A2' => 'MT', + 'NUM' => '470', + 'TLD' => 'mt', + 'IOC' => null, + 'ISO3166-2' => 'MT', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '356', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Southern Europe', + 'SUBREGION_CODE' => '039', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Malta", + 'NAME_fra' => "Malte", + 'NAME_deu' => "Malta", + ], + + 'MMR' => [ + 'A3' => 'MMR', + 'A2' => 'MM', + 'NUM' => '104', + 'TLD' => 'mm', + 'IOC' => null, + 'ISO3166-2' => 'MM', + 'UN' => null, + 'CURRENCY_CODE' => 'MMK', + 'TEL_CODE' => '95', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'South-eastern Asia', + 'SUBREGION_CODE' => '035', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Myanmar", + 'NAME_fra' => "Myanmar", + 'NAME_deu' => "Myanmar (Burma)", + ], + + 'MNE' => [ + 'A3' => 'MNE', + 'A2' => 'ME', + 'NUM' => '499', + 'TLD' => 'me', + 'IOC' => null, + 'ISO3166-2' => 'ME', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '382', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Southern Europe', + 'SUBREGION_CODE' => '039', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Montenegro", + 'NAME_fra' => "Monténégro", + 'NAME_deu' => "Montenegro", + ], + + 'MNG' => [ + 'A3' => 'MNG', + 'A2' => 'MN', + 'NUM' => '496', + 'TLD' => 'mn', + 'IOC' => null, + 'ISO3166-2' => 'MN', + 'UN' => null, + 'CURRENCY_CODE' => 'MNT', + 'TEL_CODE' => '976', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Eastern Asia', + 'SUBREGION_CODE' => '030', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Mongolia", + 'NAME_fra' => "Mongolie", + 'NAME_deu' => "Mongolei", + ], + + 'MNP' => [ + 'A3' => 'MNP', + 'A2' => 'MP', + 'NUM' => '580', + 'TLD' => 'mp', + 'IOC' => null, + 'ISO3166-2' => 'MP', + 'UN' => null, + 'CURRENCY_CODE' => 'USD', + 'TEL_CODE' => '1-670', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Micronesia', + 'SUBREGION_CODE' => '057', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Northern Mariana Islands", + 'NAME_fra' => "Mariannes du Nord, Îles", + 'NAME_deu' => "Nördliche Marianen", + ], + + 'MOZ' => [ + 'A3' => 'MOZ', + 'A2' => 'MZ', + 'NUM' => '508', + 'TLD' => 'mz', + 'IOC' => null, + 'ISO3166-2' => 'MZ', + 'UN' => null, + 'CURRENCY_CODE' => 'MZN', + 'TEL_CODE' => '258', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "Mozambique", + 'NAME_fra' => "Mozambique", + 'NAME_deu' => "Mosambik", + ], + + 'MRT' => [ + 'A3' => 'MRT', + 'A2' => 'MR', + 'NUM' => '478', + 'TLD' => 'mr', + 'IOC' => null, + 'ISO3166-2' => 'MR', + 'UN' => null, + 'CURRENCY_CODE' => 'MRO', + 'TEL_CODE' => '222', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Western Africa', + 'INTERMEDIATEREGION_CODE' => '011', + 'NAME_eng' => "Mauritania", + 'NAME_fra' => "Mauritanie", + 'NAME_deu' => "Mauretanien", + ], + + 'MSR' => [ + 'A3' => 'MSR', + 'A2' => 'MS', + 'NUM' => '500', + 'TLD' => 'ms', + 'IOC' => null, + 'ISO3166-2' => 'MS', + 'UN' => null, + 'CURRENCY_CODE' => 'XCD', + 'TEL_CODE' => '1-664', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Montserrat", + 'NAME_fra' => "Montserrat", + 'NAME_deu' => "Montserrat", + ], + + 'MTQ' => [ + 'A3' => 'MTQ', + 'A2' => 'MQ', + 'NUM' => '474', + 'TLD' => 'mq', + 'IOC' => null, + 'ISO3166-2' => 'MQ', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '596', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Martinique", + 'NAME_fra' => "Martinique", + 'NAME_deu' => "Martinique", + ], + + 'MUS' => [ + 'A3' => 'MUS', + 'A2' => 'MU', + 'NUM' => '480', + 'TLD' => 'mu', + 'IOC' => null, + 'ISO3166-2' => 'MU', + 'UN' => null, + 'CURRENCY_CODE' => 'MUR', + 'TEL_CODE' => '230', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "Mauritius", + 'NAME_fra' => "Maurice", + 'NAME_deu' => "Mauritius", + ], + + 'MWI' => [ + 'A3' => 'MWI', + 'A2' => 'MW', + 'NUM' => '454', + 'TLD' => 'mw', + 'IOC' => null, + 'ISO3166-2' => 'MW', + 'UN' => null, + 'CURRENCY_CODE' => 'MWK', + 'TEL_CODE' => '265', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "Malawi", + 'NAME_fra' => "Malawi", + 'NAME_deu' => "Malawi", + ], + + 'MYS' => [ + 'A3' => 'MYS', + 'A2' => 'MY', + 'NUM' => '458', + 'TLD' => 'my', + 'IOC' => null, + 'ISO3166-2' => 'MY', + 'UN' => null, + 'CURRENCY_CODE' => 'MYR', + 'TEL_CODE' => '60', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'South-eastern Asia', + 'SUBREGION_CODE' => '035', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Malaysia", + 'NAME_fra' => "Malaisie", + 'NAME_deu' => "Malaysia", + ], + + 'MYT' => [ + 'A3' => 'MYT', + 'A2' => 'YT', + 'NUM' => '175', + 'TLD' => 'yt', + 'IOC' => null, + 'ISO3166-2' => 'YT', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '262', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "Mayotte", + 'NAME_fra' => "Mayotte", + 'NAME_deu' => "Mayotte", + ], + + 'NAM' => [ + 'A3' => 'NAM', + 'A2' => 'NA', + 'NUM' => '516', + 'TLD' => 'na', + 'IOC' => null, + 'ISO3166-2' => 'NA', + 'UN' => null, + 'CURRENCY_CODE' => 'ZAR', + 'TEL_CODE' => '264', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Southern Africa', + 'INTERMEDIATEREGION_CODE' => '018', + 'NAME_eng' => "Namibia", + 'NAME_fra' => "Namibie", + 'NAME_deu' => "Namibia", + ], + + 'NCL' => [ + 'A3' => 'NCL', + 'A2' => 'NC', + 'NUM' => '540', + 'TLD' => 'nc', + 'IOC' => null, + 'ISO3166-2' => 'NC', + 'UN' => null, + 'CURRENCY_CODE' => 'XPF', + 'TEL_CODE' => '687', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Melanesia', + 'SUBREGION_CODE' => '054', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "New Caledonia", + 'NAME_fra' => "Nouvelle-Calédonie", + 'NAME_deu' => "Neukaledonien", + ], + + 'NER' => [ + 'A3' => 'NER', + 'A2' => 'NE', + 'NUM' => '562', + 'TLD' => 'ne', + 'IOC' => null, + 'ISO3166-2' => 'NE', + 'UN' => null, + 'CURRENCY_CODE' => 'XOF', + 'TEL_CODE' => '227', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Western Africa', + 'INTERMEDIATEREGION_CODE' => '011', + 'NAME_eng' => "Niger", + 'NAME_fra' => "Niger", + 'NAME_deu' => "Niger", + ], + + 'NFK' => [ + 'A3' => 'NFK', + 'A2' => 'NF', + 'NUM' => '574', + 'TLD' => 'nf', + 'IOC' => null, + 'ISO3166-2' => 'NF', + 'UN' => null, + 'CURRENCY_CODE' => 'AUD', + 'TEL_CODE' => '672', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Australia and New Zealand', + 'SUBREGION_CODE' => '053', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Norfolk Island", + 'NAME_fra' => "Norfolk, Île", + 'NAME_deu' => "Norfolkinsel", + ], + + 'NGA' => [ + 'A3' => 'NGA', + 'A2' => 'NG', + 'NUM' => '566', + 'TLD' => 'ng', + 'IOC' => null, + 'ISO3166-2' => 'NG', + 'UN' => null, + 'CURRENCY_CODE' => 'NGN', + 'TEL_CODE' => '234', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Western Africa', + 'INTERMEDIATEREGION_CODE' => '011', + 'NAME_eng' => "Nigeria", + 'NAME_fra' => "Nigéria", + 'NAME_deu' => "Nigeria", + ], + + 'NIC' => [ + 'A3' => 'NIC', + 'A2' => 'NI', + 'NUM' => '558', + 'TLD' => 'ni', + 'IOC' => null, + 'ISO3166-2' => 'NI', + 'UN' => null, + 'CURRENCY_CODE' => 'NIO', + 'TEL_CODE' => '505', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Central America', + 'INTERMEDIATEREGION_CODE' => '013', + 'NAME_eng' => "Nicaragua", + 'NAME_fra' => "Nicaragua", + 'NAME_deu' => "Nicaragua", + ], + + 'NIU' => [ + 'A3' => 'NIU', + 'A2' => 'NU', + 'NUM' => '570', + 'TLD' => 'nu', + 'IOC' => null, + 'ISO3166-2' => 'NU', + 'UN' => null, + 'CURRENCY_CODE' => 'NZD', + 'TEL_CODE' => '683', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Polynesia', + 'SUBREGION_CODE' => '061', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Niue", + 'NAME_fra' => "Niué", + 'NAME_deu' => "Niue", + ], + + 'NLD' => [ + 'A3' => 'NLD', + 'A2' => 'NL', + 'NUM' => '528', + 'TLD' => 'nl', + 'IOC' => null, + 'ISO3166-2' => 'NL', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '31', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Western Europe', + 'SUBREGION_CODE' => '155', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Netherlands", + 'NAME_fra' => "Pays-Bas", + 'NAME_deu' => "Niederlande", + ], + + 'NOR' => [ + 'A3' => 'NOR', + 'A2' => 'NO', + 'NUM' => '578', + 'TLD' => 'no', + 'IOC' => null, + 'ISO3166-2' => 'NO', + 'UN' => null, + 'CURRENCY_CODE' => 'NOK', + 'TEL_CODE' => '47', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Northern Europe', + 'SUBREGION_CODE' => '154', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Norway", + 'NAME_fra' => "Norvège", + 'NAME_deu' => "Norwegen", + ], + + 'NPL' => [ + 'A3' => 'NPL', + 'A2' => 'NP', + 'NUM' => '524', + 'TLD' => 'np', + 'IOC' => null, + 'ISO3166-2' => 'NP', + 'UN' => null, + 'CURRENCY_CODE' => 'NPR', + 'TEL_CODE' => '977', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Southern Asia', + 'SUBREGION_CODE' => '034', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Nepal", + 'NAME_fra' => "Népal", + 'NAME_deu' => "Nepal", + ], + + 'NRU' => [ + 'A3' => 'NRU', + 'A2' => 'NR', + 'NUM' => '520', + 'TLD' => 'nr', + 'IOC' => null, + 'ISO3166-2' => 'NR', + 'UN' => null, + 'CURRENCY_CODE' => 'AUD', + 'TEL_CODE' => '674', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Micronesia', + 'SUBREGION_CODE' => '057', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Nauru", + 'NAME_fra' => "Nauru", + 'NAME_deu' => "Nauru", + ], + + 'NZL' => [ + 'A3' => 'NZL', + 'A2' => 'NZ', + 'NUM' => '554', + 'TLD' => 'nz', + 'IOC' => null, + 'ISO3166-2' => 'NZ', + 'UN' => null, + 'CURRENCY_CODE' => 'NZD', + 'TEL_CODE' => '64', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Australia and New Zealand', + 'SUBREGION_CODE' => '053', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "New Zealand", + 'NAME_fra' => "Nouvelle-Zélande", + 'NAME_deu' => "Neuseeland", + ], + + 'OMN' => [ + 'A3' => 'OMN', + 'A2' => 'OM', + 'NUM' => '512', + 'TLD' => 'om', + 'IOC' => null, + 'ISO3166-2' => 'OM', + 'UN' => null, + 'CURRENCY_CODE' => 'OMR', + 'TEL_CODE' => '968', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Western Asia', + 'SUBREGION_CODE' => '145', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Oman", + 'NAME_fra' => "Oman", + 'NAME_deu' => "Oman", + ], + + 'PAK' => [ + 'A3' => 'PAK', + 'A2' => 'PK', + 'NUM' => '586', + 'TLD' => 'pk', + 'IOC' => null, + 'ISO3166-2' => 'PK', + 'UN' => null, + 'CURRENCY_CODE' => 'PKR', + 'TEL_CODE' => '92', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Southern Asia', + 'SUBREGION_CODE' => '034', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Pakistan", + 'NAME_fra' => "Pakistan", + 'NAME_deu' => "Pakistan", + ], + + 'PAN' => [ + 'A3' => 'PAN', + 'A2' => 'PA', + 'NUM' => '591', + 'TLD' => 'pa', + 'IOC' => null, + 'ISO3166-2' => 'PA', + 'UN' => null, + 'CURRENCY_CODE' => 'USD', + 'TEL_CODE' => '507', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Central America', + 'INTERMEDIATEREGION_CODE' => '013', + 'NAME_eng' => "Panama", + 'NAME_fra' => "Panama", + 'NAME_deu' => "Panama", + ], + + 'PCN' => [ + 'A3' => 'PCN', + 'A2' => 'PN', + 'NUM' => '612', + 'TLD' => 'pn', + 'IOC' => null, + 'ISO3166-2' => 'PN', + 'UN' => null, + 'CURRENCY_CODE' => 'NZD', + 'TEL_CODE' => '870', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Polynesia', + 'SUBREGION_CODE' => '061', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Pitcairn", + 'NAME_fra' => "Pitcairn", + 'NAME_deu' => "Pitcairninseln", + ], + + 'PER' => [ + 'A3' => 'PER', + 'A2' => 'PE', + 'NUM' => '604', + 'TLD' => 'pe', + 'IOC' => null, + 'ISO3166-2' => 'PE', + 'UN' => null, + 'CURRENCY_CODE' => 'PEN', + 'TEL_CODE' => '51', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'South America', + 'INTERMEDIATEREGION_CODE' => '005', + 'NAME_eng' => "Peru", + 'NAME_fra' => "Pérou", + 'NAME_deu' => "Peru", + ], + + 'PHL' => [ + 'A3' => 'PHL', + 'A2' => 'PH', + 'NUM' => '608', + 'TLD' => 'ph', + 'IOC' => null, + 'ISO3166-2' => 'PH', + 'UN' => null, + 'CURRENCY_CODE' => 'PHP', + 'TEL_CODE' => '63', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'South-eastern Asia', + 'SUBREGION_CODE' => '035', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Philippines", + 'NAME_fra' => "Philippines", + 'NAME_deu' => "Philippinen", + ], + + 'PLW' => [ + 'A3' => 'PLW', + 'A2' => 'PW', + 'NUM' => '585', + 'TLD' => 'pw', + 'IOC' => null, + 'ISO3166-2' => 'PW', + 'UN' => null, + 'CURRENCY_CODE' => 'USD', + 'TEL_CODE' => '680', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Micronesia', + 'SUBREGION_CODE' => '057', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Palau", + 'NAME_fra' => "Palaos", + 'NAME_deu' => "Palau", + ], + + 'PNG' => [ + 'A3' => 'PNG', + 'A2' => 'PG', + 'NUM' => '598', + 'TLD' => 'pg', + 'IOC' => null, + 'ISO3166-2' => 'PG', + 'UN' => null, + 'CURRENCY_CODE' => 'PGK', + 'TEL_CODE' => '675', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Melanesia', + 'SUBREGION_CODE' => '054', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Papua New Guinea", + 'NAME_fra' => "Papouasie-Nouvelle-Guinée", + 'NAME_deu' => "Papua-Neuguinea", + ], + + 'POL' => [ + 'A3' => 'POL', + 'A2' => 'PL', + 'NUM' => '616', + 'TLD' => 'pl', + 'IOC' => null, + 'ISO3166-2' => 'PL', + 'UN' => null, + 'CURRENCY_CODE' => 'PLN', + 'TEL_CODE' => '48', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Eastern Europe', + 'SUBREGION_CODE' => '151', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Poland", + 'NAME_fra' => "Pologne", + 'NAME_deu' => "Polen", + ], + + 'PRI' => [ + 'A3' => 'PRI', + 'A2' => 'PR', + 'NUM' => '630', + 'TLD' => 'pr', + 'IOC' => null, + 'ISO3166-2' => 'PR', + 'UN' => null, + 'CURRENCY_CODE' => 'USD', + 'TEL_CODE' => '1-787,1-939', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Puerto Rico", + 'NAME_fra' => "Porto Rico", + 'NAME_deu' => "Puerto Rico", + ], + + 'PRK' => [ + 'A3' => 'PRK', + 'A2' => 'KP', + 'NUM' => '408', + 'TLD' => 'kp', + 'IOC' => null, + 'ISO3166-2' => 'KP', + 'UN' => null, + 'CURRENCY_CODE' => 'KPW', + 'TEL_CODE' => '850', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Eastern Asia', + 'SUBREGION_CODE' => '030', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Korea, Democratic People's Republic of", + 'NAME_fra' => "Corée, République Populaire Démocratique de", + 'NAME_deu' => "Korea, Demokratische Volksrepublik (Nordkorea)", + ], + + 'PRT' => [ + 'A3' => 'PRT', + 'A2' => 'PT', + 'NUM' => '620', + 'TLD' => 'pt', + 'IOC' => null, + 'ISO3166-2' => 'PT', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '351', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Southern Europe', + 'SUBREGION_CODE' => '039', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Portugal", + 'NAME_fra' => "Portugal", + 'NAME_deu' => "Portugal", + ], + + 'PRY' => [ + 'A3' => 'PRY', + 'A2' => 'PY', + 'NUM' => '600', + 'TLD' => 'py', + 'IOC' => null, + 'ISO3166-2' => 'PY', + 'UN' => null, + 'CURRENCY_CODE' => 'PYG', + 'TEL_CODE' => '595', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'South America', + 'INTERMEDIATEREGION_CODE' => '005', + 'NAME_eng' => "Paraguay", + 'NAME_fra' => "Paraguay", + 'NAME_deu' => "Paraguay", + ], + + 'PSE' => [ + 'A3' => 'PSE', + 'A2' => 'PS', + 'NUM' => '275', + 'TLD' => 'ps', + 'IOC' => null, + 'ISO3166-2' => 'PS', + 'UN' => null, + 'CURRENCY_CODE' => null, + 'TEL_CODE' => '970', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Western Asia', + 'SUBREGION_CODE' => '145', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Palestine, State of", + 'NAME_fra' => "Palestine, État de", + 'NAME_deu' => "Palästina, Staat", + ], + + 'PYF' => [ + 'A3' => 'PYF', + 'A2' => 'PF', + 'NUM' => '258', + 'TLD' => 'pf', + 'IOC' => null, + 'ISO3166-2' => 'PF', + 'UN' => null, + 'CURRENCY_CODE' => 'XPF', + 'TEL_CODE' => '689', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Polynesia', + 'SUBREGION_CODE' => '061', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "French Polynesia", + 'NAME_fra' => "Polynésie Française", + 'NAME_deu' => "Französisch-Polynesien", + ], + + 'QAT' => [ + 'A3' => 'QAT', + 'A2' => 'QA', + 'NUM' => '634', + 'TLD' => 'qa', + 'IOC' => null, + 'ISO3166-2' => 'QA', + 'UN' => null, + 'CURRENCY_CODE' => 'QAR', + 'TEL_CODE' => '974', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Western Asia', + 'SUBREGION_CODE' => '145', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Qatar", + 'NAME_fra' => "Qatar", + 'NAME_deu' => "Katar", + ], + + 'REU' => [ + 'A3' => 'REU', + 'A2' => 'RE', + 'NUM' => '638', + 'TLD' => 're', + 'IOC' => null, + 'ISO3166-2' => 'RE', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '262', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "Réunion", + 'NAME_fra' => "Réunion", + 'NAME_deu' => "Réunion", + ], + + 'ROU' => [ + 'A3' => 'ROU', + 'A2' => 'RO', + 'NUM' => '642', + 'TLD' => 'ro', + 'IOC' => null, + 'ISO3166-2' => 'RO', + 'UN' => null, + 'CURRENCY_CODE' => 'RON', + 'TEL_CODE' => '40', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Eastern Europe', + 'SUBREGION_CODE' => '151', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Romania", + 'NAME_fra' => "Roumanie", + 'NAME_deu' => "Rumänien", + ], + + 'RUS' => [ + 'A3' => 'RUS', + 'A2' => 'RU', + 'NUM' => '643', + 'TLD' => 'ru', + 'IOC' => null, + 'ISO3166-2' => 'RU', + 'UN' => null, + 'CURRENCY_CODE' => 'RUB', + 'TEL_CODE' => '7', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Eastern Europe', + 'SUBREGION_CODE' => '151', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Russian Federation", + 'NAME_fra' => "Russie, Fédération de", + 'NAME_deu' => "Russische Föderation", + ], + + 'RWA' => [ + 'A3' => 'RWA', + 'A2' => 'RW', + 'NUM' => '646', + 'TLD' => 'rw', + 'IOC' => null, + 'ISO3166-2' => 'RW', + 'UN' => null, + 'CURRENCY_CODE' => 'RWF', + 'TEL_CODE' => '250', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "Rwanda", + 'NAME_fra' => "Rwanda", + 'NAME_deu' => "Ruanda", + ], + + 'SAU' => [ + 'A3' => 'SAU', + 'A2' => 'SA', + 'NUM' => '682', + 'TLD' => 'sa', + 'IOC' => null, + 'ISO3166-2' => 'SA', + 'UN' => null, + 'CURRENCY_CODE' => 'SAR', + 'TEL_CODE' => '966', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Western Asia', + 'SUBREGION_CODE' => '145', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Saudi Arabia", + 'NAME_fra' => "Arabie Saoudite", + 'NAME_deu' => "Saudi-Arabien", + ], + + 'SDN' => [ + 'A3' => 'SDN', + 'A2' => 'SD', + 'NUM' => '729', + 'TLD' => 'sd', + 'IOC' => null, + 'ISO3166-2' => 'SD', + 'UN' => null, + 'CURRENCY_CODE' => 'SDG', + 'TEL_CODE' => '249', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Northern Africa', + 'SUBREGION_CODE' => '015', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Sudan", + 'NAME_fra' => "Soudan", + 'NAME_deu' => "Sudan", + ], + + 'SEN' => [ + 'A3' => 'SEN', + 'A2' => 'SN', + 'NUM' => '686', + 'TLD' => 'sn', + 'IOC' => null, + 'ISO3166-2' => 'SN', + 'UN' => null, + 'CURRENCY_CODE' => 'XOF', + 'TEL_CODE' => '221', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Western Africa', + 'INTERMEDIATEREGION_CODE' => '011', + 'NAME_eng' => "Senegal", + 'NAME_fra' => "Sénégal", + 'NAME_deu' => "Senegal", + ], + + 'SGP' => [ + 'A3' => 'SGP', + 'A2' => 'SG', + 'NUM' => '702', + 'TLD' => 'sg', + 'IOC' => null, + 'ISO3166-2' => 'SG', + 'UN' => null, + 'CURRENCY_CODE' => 'SGD', + 'TEL_CODE' => '65', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'South-eastern Asia', + 'SUBREGION_CODE' => '035', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Singapore", + 'NAME_fra' => "Singapour", + 'NAME_deu' => "Singapur", + ], + + 'SGS' => [ + 'A3' => 'SGS', + 'A2' => 'GS', + 'NUM' => '239', + 'TLD' => 'gs', + 'IOC' => null, + 'ISO3166-2' => 'GS', + 'UN' => null, + 'CURRENCY_CODE' => null, + 'TEL_CODE' => '500', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'South America', + 'INTERMEDIATEREGION_CODE' => '005', + 'NAME_eng' => "South Georgia and the South Sandwich Islands", + 'NAME_fra' => "Géorgie du Sud-Et-Les Îles Sandwich du Sud", + 'NAME_deu' => "Südgeorgien und die Südlichen Sandwichinseln", + ], + + 'SHN' => [ + 'A3' => 'SHN', + 'A2' => 'SH', + 'NUM' => '654', + 'TLD' => 'sh', + 'IOC' => null, + 'ISO3166-2' => 'SH', + 'UN' => null, + 'CURRENCY_CODE' => 'SHP', + 'TEL_CODE' => '290,247', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Western Africa', + 'INTERMEDIATEREGION_CODE' => '011', + 'NAME_eng' => "Saint Helena, Ascension and Tristan da Cunha", + 'NAME_fra' => "Sainte-Hélène, Ascension et Tristan da Cunha", + 'NAME_deu' => "St. Helena", + ], + + 'SJM' => [ + 'A3' => 'SJM', + 'A2' => 'SJ', + 'NUM' => '744', + 'TLD' => 'sj', + 'IOC' => null, + 'ISO3166-2' => 'SJ', + 'UN' => null, + 'CURRENCY_CODE' => 'NOK', + 'TEL_CODE' => '47', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Northern Europe', + 'SUBREGION_CODE' => '154', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Svalbard and Jan Mayen", + 'NAME_fra' => "Svalbard et Île Jan Mayen", + 'NAME_deu' => "Svalbard und Jan Mayen", + ], + + 'SLB' => [ + 'A3' => 'SLB', + 'A2' => 'SB', + 'NUM' => '090', + 'TLD' => 'sb', + 'IOC' => null, + 'ISO3166-2' => 'SB', + 'UN' => null, + 'CURRENCY_CODE' => 'SBD', + 'TEL_CODE' => '677', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Melanesia', + 'SUBREGION_CODE' => '054', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Solomon Islands", + 'NAME_fra' => "Salomon, Îles", + 'NAME_deu' => "Salomonen", + ], + + 'SLE' => [ + 'A3' => 'SLE', + 'A2' => 'SL', + 'NUM' => '694', + 'TLD' => 'sl', + 'IOC' => null, + 'ISO3166-2' => 'SL', + 'UN' => null, + 'CURRENCY_CODE' => 'SLL', + 'TEL_CODE' => '232', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Western Africa', + 'INTERMEDIATEREGION_CODE' => '011', + 'NAME_eng' => "Sierra Leone", + 'NAME_fra' => "Sierra Leone", + 'NAME_deu' => "Sierra Leone", + ], + + 'SLV' => [ + 'A3' => 'SLV', + 'A2' => 'SV', + 'NUM' => '222', + 'TLD' => 'sv', + 'IOC' => null, + 'ISO3166-2' => 'SV', + 'UN' => null, + 'CURRENCY_CODE' => 'USD', + 'TEL_CODE' => '503', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Central America', + 'INTERMEDIATEREGION_CODE' => '013', + 'NAME_eng' => "El Salvador", + 'NAME_fra' => "El Salvador", + 'NAME_deu' => "El Salvador", + ], + + 'SMR' => [ + 'A3' => 'SMR', + 'A2' => 'SM', + 'NUM' => '674', + 'TLD' => 'sm', + 'IOC' => null, + 'ISO3166-2' => 'SM', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '378', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Southern Europe', + 'SUBREGION_CODE' => '039', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "San Marino", + 'NAME_fra' => "Saint-Marin", + 'NAME_deu' => "San Marino", + ], + + 'SOM' => [ + 'A3' => 'SOM', + 'A2' => 'SO', + 'NUM' => '706', + 'TLD' => 'so', + 'IOC' => null, + 'ISO3166-2' => 'SO', + 'UN' => null, + 'CURRENCY_CODE' => 'SOS', + 'TEL_CODE' => '252', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "Somalia", + 'NAME_fra' => "Somalie", + 'NAME_deu' => "Somalia", + ], + + 'SPM' => [ + 'A3' => 'SPM', + 'A2' => 'PM', + 'NUM' => '666', + 'TLD' => 'pm', + 'IOC' => null, + 'ISO3166-2' => 'PM', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '508', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Northern America', + 'SUBREGION_CODE' => '021', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Saint Pierre and Miquelon", + 'NAME_fra' => "Saint-Pierre-Et-Miquelon", + 'NAME_deu' => "Saint-Pierre und Miquelon", + ], + + 'SRB' => [ + 'A3' => 'SRB', + 'A2' => 'RS', + 'NUM' => '688', + 'TLD' => 'rs', + 'IOC' => null, + 'ISO3166-2' => 'RS', + 'UN' => null, + 'CURRENCY_CODE' => 'RSD', + 'TEL_CODE' => '381', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Southern Europe', + 'SUBREGION_CODE' => '039', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Serbia", + 'NAME_fra' => "Serbie", + 'NAME_deu' => "Serbien", + ], + + 'SSD' => [ + 'A3' => 'SSD', + 'A2' => 'SS', + 'NUM' => '728', + 'TLD' => 'ss', + 'IOC' => null, + 'ISO3166-2' => 'SS', + 'UN' => null, + 'CURRENCY_CODE' => 'SSP', + 'TEL_CODE' => '211', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "South Sudan", + 'NAME_fra' => "Soudan du Sud", + 'NAME_deu' => "Südsudan", + ], + + 'STP' => [ + 'A3' => 'STP', + 'A2' => 'ST', + 'NUM' => '678', + 'TLD' => 'st', + 'IOC' => null, + 'ISO3166-2' => 'ST', + 'UN' => null, + 'CURRENCY_CODE' => 'STD', + 'TEL_CODE' => '239', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Middle Africa', + 'INTERMEDIATEREGION_CODE' => '017', + 'NAME_eng' => "Sao Tome and Principe", + 'NAME_fra' => "Sao Tomé-Et-Principe", + 'NAME_deu' => "São Tomé und Príncipe", + ], + + 'SUR' => [ + 'A3' => 'SUR', + 'A2' => 'SR', + 'NUM' => '740', + 'TLD' => 'sr', + 'IOC' => null, + 'ISO3166-2' => 'SR', + 'UN' => null, + 'CURRENCY_CODE' => 'SRD', + 'TEL_CODE' => '597', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'South America', + 'INTERMEDIATEREGION_CODE' => '005', + 'NAME_eng' => "Suriname", + 'NAME_fra' => "Suriname", + 'NAME_deu' => "Suriname", + ], + + 'SVK' => [ + 'A3' => 'SVK', + 'A2' => 'SK', + 'NUM' => '703', + 'TLD' => 'sk', + 'IOC' => null, + 'ISO3166-2' => 'SK', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '421', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Eastern Europe', + 'SUBREGION_CODE' => '151', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Slovakia", + 'NAME_fra' => "Slovaquie", + 'NAME_deu' => "Slowakei", + ], + + 'SVN' => [ + 'A3' => 'SVN', + 'A2' => 'SI', + 'NUM' => '705', + 'TLD' => 'si', + 'IOC' => null, + 'ISO3166-2' => 'SI', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '386', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Southern Europe', + 'SUBREGION_CODE' => '039', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Slovenia", + 'NAME_fra' => "Slovénie", + 'NAME_deu' => "Slowenien", + ], + + 'SWE' => [ + 'A3' => 'SWE', + 'A2' => 'SE', + 'NUM' => '752', + 'TLD' => 'se', + 'IOC' => null, + 'ISO3166-2' => 'SE', + 'UN' => null, + 'CURRENCY_CODE' => 'SEK', + 'TEL_CODE' => '46', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Northern Europe', + 'SUBREGION_CODE' => '154', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Sweden", + 'NAME_fra' => "Suède", + 'NAME_deu' => "Schweden", + ], + + 'SWZ' => [ + 'A3' => 'SWZ', + 'A2' => 'SZ', + 'NUM' => '748', + 'TLD' => 'sz', + 'IOC' => null, + 'ISO3166-2' => 'SZ', + 'UN' => null, + 'CURRENCY_CODE' => 'SZL', + 'TEL_CODE' => '268', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Southern Africa', + 'INTERMEDIATEREGION_CODE' => '018', + 'NAME_eng' => "Swaziland", + 'NAME_fra' => "Swaziland", + 'NAME_deu' => "Swasiland", + ], + + 'SXM' => [ + 'A3' => 'SXM', + 'A2' => 'SX', + 'NUM' => '534', + 'TLD' => 'sx', + 'IOC' => null, + 'ISO3166-2' => 'SX', + 'UN' => null, + 'CURRENCY_CODE' => 'ANG', + 'TEL_CODE' => '1-721', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Sint Maarten (Dutch part)", + 'NAME_fra' => "Saint-Martin (Partie Néerlandaise)", + 'NAME_deu' => "Sint Maarten (niederl. Teil)", + ], + + 'SYC' => [ + 'A3' => 'SYC', + 'A2' => 'SC', + 'NUM' => '690', + 'TLD' => 'sc', + 'IOC' => null, + 'ISO3166-2' => 'SC', + 'UN' => null, + 'CURRENCY_CODE' => 'SCR', + 'TEL_CODE' => '248', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "Seychelles", + 'NAME_fra' => "Seychelles", + 'NAME_deu' => "Seychellen", + ], + + 'SYR' => [ + 'A3' => 'SYR', + 'A2' => 'SY', + 'NUM' => '760', + 'TLD' => 'sy', + 'IOC' => null, + 'ISO3166-2' => 'SY', + 'UN' => null, + 'CURRENCY_CODE' => 'SYP', + 'TEL_CODE' => '963', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Western Asia', + 'SUBREGION_CODE' => '145', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Syrian Arab Republic", + 'NAME_fra' => "Syrienne, République Arabe", + 'NAME_deu' => "Syrien, Arabische Republik", + ], + + 'TCA' => [ + 'A3' => 'TCA', + 'A2' => 'TC', + 'NUM' => '796', + 'TLD' => 'tc', + 'IOC' => null, + 'ISO3166-2' => 'TC', + 'UN' => null, + 'CURRENCY_CODE' => 'USD', + 'TEL_CODE' => '1-649', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Turks and Caicos Islands", + 'NAME_fra' => "Turks-Et-Caïcos, Îles", + 'NAME_deu' => "Turks- und Caicosinseln", + ], + + 'TCD' => [ + 'A3' => 'TCD', + 'A2' => 'TD', + 'NUM' => '148', + 'TLD' => 'td', + 'IOC' => null, + 'ISO3166-2' => 'TD', + 'UN' => null, + 'CURRENCY_CODE' => 'XAF', + 'TEL_CODE' => '235', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Middle Africa', + 'INTERMEDIATEREGION_CODE' => '017', + 'NAME_eng' => "Chad", + 'NAME_fra' => "Tchad", + 'NAME_deu' => "Tschad", + ], + + 'TGO' => [ + 'A3' => 'TGO', + 'A2' => 'TG', + 'NUM' => '768', + 'TLD' => 'tg', + 'IOC' => null, + 'ISO3166-2' => 'TG', + 'UN' => null, + 'CURRENCY_CODE' => 'XOF', + 'TEL_CODE' => '228', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Western Africa', + 'INTERMEDIATEREGION_CODE' => '011', + 'NAME_eng' => "Togo", + 'NAME_fra' => "Togo", + 'NAME_deu' => "Togo", + ], + + 'THA' => [ + 'A3' => 'THA', + 'A2' => 'TH', + 'NUM' => '764', + 'TLD' => 'th', + 'IOC' => null, + 'ISO3166-2' => 'TH', + 'UN' => null, + 'CURRENCY_CODE' => 'THB', + 'TEL_CODE' => '66', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'South-eastern Asia', + 'SUBREGION_CODE' => '035', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Thailand", + 'NAME_fra' => "Thaïlande", + 'NAME_deu' => "Thailand", + ], + + 'TJK' => [ + 'A3' => 'TJK', + 'A2' => 'TJ', + 'NUM' => '762', + 'TLD' => 'tj', + 'IOC' => null, + 'ISO3166-2' => 'TJ', + 'UN' => null, + 'CURRENCY_CODE' => 'TJS', + 'TEL_CODE' => '992', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Central Asia', + 'SUBREGION_CODE' => '143', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Tajikistan", + 'NAME_fra' => "Tadjikistan", + 'NAME_deu' => "Tadschikistan", + ], + + 'TKL' => [ + 'A3' => 'TKL', + 'A2' => 'TK', + 'NUM' => '772', + 'TLD' => 'tk', + 'IOC' => null, + 'ISO3166-2' => 'TK', + 'UN' => null, + 'CURRENCY_CODE' => 'NZD', + 'TEL_CODE' => '690', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Polynesia', + 'SUBREGION_CODE' => '061', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Tokelau", + 'NAME_fra' => "Tokelau", + 'NAME_deu' => "Tokelau", + ], + + 'TKM' => [ + 'A3' => 'TKM', + 'A2' => 'TM', + 'NUM' => '795', + 'TLD' => 'tm', + 'IOC' => null, + 'ISO3166-2' => 'TM', + 'UN' => null, + 'CURRENCY_CODE' => 'TMT', + 'TEL_CODE' => '993', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Central Asia', + 'SUBREGION_CODE' => '143', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Turkmenistan", + 'NAME_fra' => "Turkménistan", + 'NAME_deu' => "Turkmenistan", + ], + + 'TLS' => [ + 'A3' => 'TLS', + 'A2' => 'TL', + 'NUM' => '626', + 'TLD' => 'tl', + 'IOC' => null, + 'ISO3166-2' => 'TL', + 'UN' => null, + 'CURRENCY_CODE' => 'USD', + 'TEL_CODE' => '670', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'South-eastern Asia', + 'SUBREGION_CODE' => '035', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Timor-Leste", + 'NAME_fra' => "Timor-Leste", + 'NAME_deu' => "Osttimor (Timor-Leste)", + ], + + 'TON' => [ + 'A3' => 'TON', + 'A2' => 'TO', + 'NUM' => '776', + 'TLD' => 'to', + 'IOC' => null, + 'ISO3166-2' => 'TO', + 'UN' => null, + 'CURRENCY_CODE' => 'TOP', + 'TEL_CODE' => '676', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Polynesia', + 'SUBREGION_CODE' => '061', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Tonga", + 'NAME_fra' => "Tonga", + 'NAME_deu' => "Tonga", + ], + + 'TTO' => [ + 'A3' => 'TTO', + 'A2' => 'TT', + 'NUM' => '780', + 'TLD' => 'tt', + 'IOC' => null, + 'ISO3166-2' => 'TT', + 'UN' => null, + 'CURRENCY_CODE' => 'TTD', + 'TEL_CODE' => '1-868', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Trinidad and Tobago", + 'NAME_fra' => "Trinité-Et-Tobago", + 'NAME_deu' => "Trinidad und Tobago", + ], + + 'TUN' => [ + 'A3' => 'TUN', + 'A2' => 'TN', + 'NUM' => '788', + 'TLD' => 'tn', + 'IOC' => null, + 'ISO3166-2' => 'TN', + 'UN' => null, + 'CURRENCY_CODE' => 'TND', + 'TEL_CODE' => '216', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Northern Africa', + 'SUBREGION_CODE' => '015', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Tunisia", + 'NAME_fra' => "Tunisie", + 'NAME_deu' => "Tunesien", + ], + + 'TUR' => [ + 'A3' => 'TUR', + 'A2' => 'TR', + 'NUM' => '792', + 'TLD' => 'tr', + 'IOC' => null, + 'ISO3166-2' => 'TR', + 'UN' => null, + 'CURRENCY_CODE' => 'TRY', + 'TEL_CODE' => '90', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Western Asia', + 'SUBREGION_CODE' => '145', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Turkey", + 'NAME_fra' => "Turquie", + 'NAME_deu' => "Türkei", + ], + + 'TUV' => [ + 'A3' => 'TUV', + 'A2' => 'TV', + 'NUM' => '798', + 'TLD' => 'tv', + 'IOC' => null, + 'ISO3166-2' => 'TV', + 'UN' => null, + 'CURRENCY_CODE' => 'AUD', + 'TEL_CODE' => '688', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Polynesia', + 'SUBREGION_CODE' => '061', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Tuvalu", + 'NAME_fra' => "Tuvalu", + 'NAME_deu' => "Tuvalu", + ], + + 'TWN' => [ + 'A3' => 'TWN', + 'A2' => 'TW', + 'NUM' => '158', + 'TLD' => 'tw', + 'IOC' => null, + 'ISO3166-2' => 'TW', + 'UN' => null, + 'CURRENCY_CODE' => 'TWD', + 'TEL_CODE' => '886', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Eastern Asia', + 'SUBREGION_CODE' => '030', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Taiwan, Province of China", + 'NAME_fra' => "Taïwan, Province de Chine", + 'NAME_deu' => "Taiwan, Republik China", + ], + + 'TZA' => [ + 'A3' => 'TZA', + 'A2' => 'TZ', + 'NUM' => '834', + 'TLD' => 'tz', + 'IOC' => null, + 'ISO3166-2' => 'TZ', + 'UN' => null, + 'CURRENCY_CODE' => 'TZS', + 'TEL_CODE' => '255', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "Tanzania, United Republic of", + 'NAME_fra' => "Tanzanie, République-Unie de", + 'NAME_deu' => "Tansania, Vereinigte Republik", + ], + + 'UGA' => [ + 'A3' => 'UGA', + 'A2' => 'UG', + 'NUM' => '800', + 'TLD' => 'ug', + 'IOC' => null, + 'ISO3166-2' => 'UG', + 'UN' => null, + 'CURRENCY_CODE' => 'UGX', + 'TEL_CODE' => '256', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "Uganda", + 'NAME_fra' => "Ouganda", + 'NAME_deu' => "Uganda", + ], + + 'UKR' => [ + 'A3' => 'UKR', + 'A2' => 'UA', + 'NUM' => '804', + 'TLD' => 'ua', + 'IOC' => null, + 'ISO3166-2' => 'UA', + 'UN' => null, + 'CURRENCY_CODE' => 'UAH', + 'TEL_CODE' => '380', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Eastern Europe', + 'SUBREGION_CODE' => '151', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Ukraine", + 'NAME_fra' => "Ukraine", + 'NAME_deu' => "Ukraine", + ], + + 'UMI' => [ + 'A3' => 'UMI', + 'A2' => 'UM', + 'NUM' => '581', + 'TLD' => 'um', + 'IOC' => null, + 'ISO3166-2' => 'UM', + 'UN' => null, + 'CURRENCY_CODE' => 'USD', + 'TEL_CODE' => ' ', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Micronesia', + 'SUBREGION_CODE' => '057', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "United States Minor Outlying Islands", + 'NAME_fra' => "Îles Mineures Éloignées des États-Unis", + 'NAME_deu' => "United States Minor Outlying Islands", + ], + + 'UNK' => [ + 'A3' => 'UNK', + 'A2' => 'XK', + 'NUM' => '', + 'TLD' => '', + 'IOC' => null, + 'ISO3166-2' => null, + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '383', + 'REGION' => null, + 'REGION_CODE' => null, + 'SUBREGION' => null, + 'SUBREGION_CODE' => null, + 'INTERMEDIATEREGION' => null, + 'INTERMEDIATEREGION_CODE' => null, + 'NAME_eng' => "Kosovo, Republic of", + 'NAME_fra' => "Kosovo", + 'NAME_deu' => "Kosovo", + ], + + 'URY' => [ + 'A3' => 'URY', + 'A2' => 'UY', + 'NUM' => '858', + 'TLD' => 'uy', + 'IOC' => null, + 'ISO3166-2' => 'UY', + 'UN' => null, + 'CURRENCY_CODE' => 'UYU', + 'TEL_CODE' => '598', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'South America', + 'INTERMEDIATEREGION_CODE' => '005', + 'NAME_eng' => "Uruguay", + 'NAME_fra' => "Uruguay", + 'NAME_deu' => "Uruguay", + ], + + 'USA' => [ + 'A3' => 'USA', + 'A2' => 'US', + 'NUM' => '840', + 'TLD' => 'us', + 'IOC' => null, + 'ISO3166-2' => 'US', + 'UN' => null, + 'CURRENCY_CODE' => 'USD', + 'TEL_CODE' => '1', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Northern America', + 'SUBREGION_CODE' => '021', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "United States", + 'NAME_fra' => "États-Unis", + 'NAME_deu' => "Vereinigte Staaten von Amerika", + ], + + 'UZB' => [ + 'A3' => 'UZB', + 'A2' => 'UZ', + 'NUM' => '860', + 'TLD' => 'uz', + 'IOC' => null, + 'ISO3166-2' => 'UZ', + 'UN' => null, + 'CURRENCY_CODE' => 'UZS', + 'TEL_CODE' => '998', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Central Asia', + 'SUBREGION_CODE' => '143', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Uzbekistan", + 'NAME_fra' => "Ouzbékistan", + 'NAME_deu' => "Usbekistan", + ], + + 'VAT' => [ + 'A3' => 'VAT', + 'A2' => 'VA', + 'NUM' => '336', + 'TLD' => 'va', + 'IOC' => null, + 'ISO3166-2' => 'VA', + 'UN' => null, + 'CURRENCY_CODE' => 'EUR', + 'TEL_CODE' => '379,39-06-698', + 'REGION' => 'Europe', + 'REGION_CODE' => '150', + 'SUBREGION' => 'Southern Europe', + 'SUBREGION_CODE' => '039', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Holy See (Vatican City State)", + 'NAME_fra' => "Saint-Siège (État de la Cité du Vatican)", + 'NAME_deu' => "Vatikanstadt", + ], + + 'VCT' => [ + 'A3' => 'VCT', + 'A2' => 'VC', + 'NUM' => '670', + 'TLD' => 'vc', + 'IOC' => null, + 'ISO3166-2' => 'VC', + 'UN' => null, + 'CURRENCY_CODE' => 'XCD', + 'TEL_CODE' => '1-784', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Saint Vincent and the Grenadines", + 'NAME_fra' => "Saint-Vincent-Et-Les Grenadines", + 'NAME_deu' => "St. Vincent und die Grenadinen", + ], + + 'VEN' => [ + 'A3' => 'VEN', + 'A2' => 'VE', + 'NUM' => '862', + 'TLD' => 've', + 'IOC' => null, + 'ISO3166-2' => 'VE', + 'UN' => null, + 'CURRENCY_CODE' => 'VEF', + 'TEL_CODE' => '58', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'South America', + 'INTERMEDIATEREGION_CODE' => '005', + 'NAME_eng' => "Venezuela, Bolivarian Republic of", + 'NAME_fra' => "Venezuela, République Bolivarienne du", + 'NAME_deu' => "Venezuela", + ], + + 'VGB' => [ + 'A3' => 'VGB', + 'A2' => 'VG', + 'NUM' => '92', + 'TLD' => 'vg', + 'IOC' => null, + 'ISO3166-2' => 'VG', + 'UN' => null, + 'CURRENCY_CODE' => 'USD', + 'TEL_CODE' => '1-284', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Virgin Islands, British", + 'NAME_fra' => "Îles Vierges Britanniques", + 'NAME_deu' => "Britische Jungferninseln", + ], + + 'VIR' => [ + 'A3' => 'VIR', + 'A2' => 'VI', + 'NUM' => '850', + 'TLD' => 'vi', + 'IOC' => null, + 'ISO3166-2' => 'VI', + 'UN' => null, + 'CURRENCY_CODE' => 'USD', + 'TEL_CODE' => '1-340', + 'REGION' => 'Americas', + 'REGION_CODE' => '019', + 'SUBREGION' => 'Latin America and the Caribbean', + 'SUBREGION_CODE' => '419', + 'INTERMEDIATEREGION' => 'Caribbean', + 'INTERMEDIATEREGION_CODE' => '029', + 'NAME_eng' => "Virgin Islands, U.S.", + 'NAME_fra' => "Îles Vierges des États-Unis", + 'NAME_deu' => "Amerikanische Jungferninseln", + ], + + 'VNM' => [ + 'A3' => 'VNM', + 'A2' => 'VN', + 'NUM' => '704', + 'TLD' => 'vn', + 'IOC' => null, + 'ISO3166-2' => 'VN', + 'UN' => null, + 'CURRENCY_CODE' => 'VND', + 'TEL_CODE' => '84', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'South-eastern Asia', + 'SUBREGION_CODE' => '035', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Viet Nam", + 'NAME_fra' => "Viet Nam", + 'NAME_deu' => "Vietnam", + ], + + 'VUT' => [ + 'A3' => 'VUT', + 'A2' => 'VU', + 'NUM' => '548', + 'TLD' => 'vu', + 'IOC' => null, + 'ISO3166-2' => 'VU', + 'UN' => null, + 'CURRENCY_CODE' => 'VUV', + 'TEL_CODE' => '678', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Melanesia', + 'SUBREGION_CODE' => '054', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Vanuatu", + 'NAME_fra' => "Vanuatu", + 'NAME_deu' => "Vanuatu", + ], + + 'WLF' => [ + 'A3' => 'WLF', + 'A2' => 'WF', + 'NUM' => '876', + 'TLD' => 'wf', + 'IOC' => null, + 'ISO3166-2' => 'WF', + 'UN' => null, + 'CURRENCY_CODE' => 'XPF', + 'TEL_CODE' => '681', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Polynesia', + 'SUBREGION_CODE' => '061', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Wallis and Futuna", + 'NAME_fra' => "Wallis et Futuna", + 'NAME_deu' => "Wallis und Futuna", + ], + + 'WSM' => [ + 'A3' => 'WSM', + 'A2' => 'WS', + 'NUM' => '882', + 'TLD' => 'ws', + 'IOC' => null, + 'ISO3166-2' => 'WS', + 'UN' => null, + 'CURRENCY_CODE' => 'WST', + 'TEL_CODE' => '685', + 'REGION' => 'Oceania', + 'REGION_CODE' => '009', + 'SUBREGION' => 'Polynesia', + 'SUBREGION_CODE' => '061', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Samoa", + 'NAME_fra' => "Samoa", + 'NAME_deu' => "Samoa", + ], + + 'YEM' => [ + 'A3' => 'YEM', + 'A2' => 'YE', + 'NUM' => '887', + 'TLD' => 'ye', + 'IOC' => null, + 'ISO3166-2' => 'YE', + 'UN' => null, + 'CURRENCY_CODE' => 'YER', + 'TEL_CODE' => '967', + 'REGION' => 'Asia', + 'REGION_CODE' => '142', + 'SUBREGION' => 'Western Asia', + 'SUBREGION_CODE' => '145', + 'INTERMEDIATEREGION' => '', + 'INTERMEDIATEREGION_CODE' => '', + 'NAME_eng' => "Yemen", + 'NAME_fra' => "Yémen", + 'NAME_deu' => "Jemen", + ], + + 'ZAF' => [ + 'A3' => 'ZAF', + 'A2' => 'ZA', + 'NUM' => '710', + 'TLD' => 'za', + 'IOC' => null, + 'ISO3166-2' => 'ZA', + 'UN' => null, + 'CURRENCY_CODE' => 'ZAR', + 'TEL_CODE' => '27', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Southern Africa', + 'INTERMEDIATEREGION_CODE' => '018', + 'NAME_eng' => "South Africa", + 'NAME_fra' => "Afrique du Sud", + 'NAME_deu' => "Südafrika", + ], + + 'ZMB' => [ + 'A3' => 'ZMB', + 'A2' => 'ZM', + 'NUM' => '894', + 'TLD' => 'zm', + 'IOC' => null, + 'ISO3166-2' => 'ZM', + 'UN' => null, + 'CURRENCY_CODE' => 'ZMW', + 'TEL_CODE' => '260', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "Zambia", + 'NAME_fra' => "Zambie", + 'NAME_deu' => "Sambia", + ], + + 'ZWE' => [ + 'A3' => 'ZWE', + 'A2' => 'ZW', + 'NUM' => '716', + 'TLD' => 'zw', + 'IOC' => null, + 'ISO3166-2' => 'ZW', + 'UN' => null, + 'CURRENCY_CODE' => 'ZWL', + 'TEL_CODE' => '263', + 'REGION' => 'Africa', + 'REGION_CODE' => '002', + 'SUBREGION' => 'Sub-Saharan Africa', + 'SUBREGION_CODE' => '202', + 'INTERMEDIATEREGION' => 'Eastern Africa', + 'INTERMEDIATEREGION_CODE' => '014', + 'NAME_eng' => "Zimbabwe", + 'NAME_fra' => "Zimbabwe", + 'NAME_deu' => "Simbabwe", + ], + +]; + diff --git a/classes/Components/I18n/data/Iso639data.php b/classes/Components/I18n/data/Iso639data.php new file mode 100644 index 00000000..5ff3ed7b --- /dev/null +++ b/classes/Components/I18n/data/Iso639data.php @@ -0,0 +1,155 @@ + [ + '639-2' => 'aar', + '639-1' => 'aa', + 'NAME_eng' => 'Afar', + 'NAME_fra' => 'afar', + 'NAME_deu' => 'Danakil-Sprache', + ], + 'abk' => [ + '639-2' => 'abk', + '639-1' => 'ab', + 'NAME_eng' => 'Abkhazian', + 'NAME_fra' => 'abkhaze', + 'NAME_deu' => 'Abchasisch', + ], + 'ace' => [ + '639-2' => 'ace', + '639-1' => null, + 'NAME_eng' => 'Achinese', + 'NAME_fra' => 'aceh', + 'NAME_deu' => 'Aceh-Sprache', + ], + 'ach' => [ + '639-2' => 'ach', + '639-1' => null, + 'NAME_eng' => 'Acoli', + 'NAME_fra' => 'acoli', + 'NAME_deu' => 'Acholi-Sprache', + ], + 'ada' => [ + '639-2' => 'ada', + '639-1' => null, + 'NAME_eng' => 'Adangme', + 'NAME_fra' => 'adangme', + 'NAME_deu' => 'Adangme-Sprache', + ], + 'ady' => [ + '639-2' => 'ady', + '639-1' => null, + 'NAME_eng' => 'Adyghe', + 'NAME_fra' => 'adyghé', + 'NAME_deu' => 'Adygisch', + ], + 'afa' => [ + '639-2' => 'afa', + '639-1' => null, + 'NAME_eng' => 'Afro-Asiatic languages', + 'NAME_fra' => 'afro-asiatiques, langues', + 'NAME_deu' => 'Hamitosemitische Sprachen (Andere)', + ], + 'afh' => [ + '639-2' => 'afh', + '639-1' => null, + 'NAME_eng' => 'Afrihili', + 'NAME_fra' => 'afrihili', + 'NAME_deu' => 'Afrihili', + ], + 'afr' => [ + '639-2' => 'afr', + '639-1' => 'af', + 'NAME_eng' => 'Afrikaans', + 'NAME_fra' => 'afrikaans', + 'NAME_deu' => 'Afrikaans', + ], + 'ain' => [ + '639-2' => 'ain', + '639-1' => null, + 'NAME_eng' => 'Ainu', + 'NAME_fra' => 'aïnou', + 'NAME_deu' => 'Ainu-Sprache', + ], + 'aka' => [ + '639-2' => 'aka', + '639-1' => 'ak', + 'NAME_eng' => 'Akan', + 'NAME_fra' => 'akan', + 'NAME_deu' => 'Akan-Sprache', + ], + 'akk' => [ + '639-2' => 'akk', + '639-1' => null, + 'NAME_eng' => 'Akkadian', + 'NAME_fra' => 'akkadien', + 'NAME_deu' => 'Akkadisch', + ], + 'sqi' => [ + '639-2' => 'sqi', + '639-1' => 'sq', + 'NAME_eng' => 'Albanian', + 'NAME_fra' => 'albanais', + 'NAME_deu' => 'Albanisch', + '639-2-B' => 'alb', + ], + + 'deu' => [ + '639-2' => 'deu', + '639-1' => 'de', + 'NAME_eng' => 'German', + 'NAME_fra' => 'allemand', + 'NAME_deu' => 'Deutsch', + '639-2-B' => 'ger', + '1L' => 'D', + ], + 'eng' => [ + '639-2' => 'eng', + '639-1' => 'en', + 'NAME_eng' => 'English', + 'NAME_fra' => 'anglais', + 'NAME_deu' => 'Englisch', + '1L' => 'E', + ], + 'fra' => [ + '639-2' => 'fra', + '639-1' => 'fr', + 'NAME_eng' => 'French', + 'NAME_fra' => 'français', + 'NAME_deu' => 'Französisch', + '639-2-B' => 'fre', + '1L' => 'F', + ], + 'ita' => [ + '639-2' => 'ita', + '639-1' => 'it', + 'NAME_eng' => 'Italian', + 'NAME_fra' => 'italien', + 'NAME_deu' => 'Italienisch', + '1L' => 'I', + ], + 'spa' => [ + '639-2' => 'spa', + '639-1' => 'es', + 'NAME_eng' => 'Spanish', + 'NAME_fra' => 'espagnol', + 'NAME_deu' => 'Spanisch', + ], + 'por' => [ + '639-2' => 'por', + '639-1' => 'pt', + 'NAME_eng' => 'Portuguese', + 'NAME_fra' => 'portugais', + 'NAME_deu' => 'Portugiesisch', + ], + 'roh' => [ + '639-2' => 'roh', + '639-1' => 'rm', + 'NAME_eng' => 'Romansh', + 'NAME_fra' => 'romanche', + 'NAME_deu' => 'Rätoromanisch', + ], + +]; From bd0392698dcbcc293e735b8286ad7c3642a58934 Mon Sep 17 00:00:00 2001 From: Roland Rusch Date: Fri, 11 Aug 2023 16:07:31 +0200 Subject: [PATCH 2/5] RETROTEC-AG/OpenXE#17 Locale des GUI-Users ermitteln --- www/pages/content/welcome_settings.tpl | 6 +++++- www/pages/welcome.php | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/www/pages/content/welcome_settings.tpl b/www/pages/content/welcome_settings.tpl index 0161d7d3..1464be20 100644 --- a/www/pages/content/welcome_settings.tpl +++ b/www/pages/content/welcome_settings.tpl @@ -97,7 +97,11 @@ {|Sprache|}: - + + {|Sprache und Region|}: + + + {|Eigene Kalenderfarbe|}: diff --git a/www/pages/welcome.php b/www/pages/welcome.php index 6bdc9d1c..9c1d91ed 100644 --- a/www/pages/welcome.php +++ b/www/pages/welcome.php @@ -1711,6 +1711,13 @@ $this->app->Tpl->Add('TODOFORUSER',"".$tmp[$i]['aufgabe']. $this->app->Tpl->Set('STARTSEITE', $settings['startseite']); $this->app->Tpl->Set('DEFAULTCOLOR', $settings['defaultcolor']); $this->app->Tpl->Set('SPRACHEBEVORZUGEN', $this->languageSelectOptions($settings['sprachebevorzugen'])); + + /** @var \Xentral\Components\I18n\Localization $localization */ + if($localization=$this->app->Container->get('Localization')) { + $this->app->Tpl->Set('LOCALE', $localization->getLocale()); + } else { + $this->app->Tpl->Set('LOCALE', 'Fehler!'); + } if($settings['chat_popup']){ $this->app->Tpl->Set('CHAT_POPUP', ' checked="checked" '); From fdafc13e2c1027dd01de34bbd20e3641d9d1a4ba Mon Sep 17 00:00:00 2001 From: Roland Rusch Date: Mon, 14 Aug 2023 13:51:19 +0200 Subject: [PATCH 3/5] RETROTEC-AG/OpenXE#17 Locale des GUI-Users ermitteln --- classes/Components/I18n/Bootstrap.php | 90 +++++++++++++++------ classes/Components/I18n/Localization.php | 33 +++++++- classes/Components/I18n/data/Iso639data.php | 5 +- www/widgets/templates/_gen/adresse.tpl | 5 +- www/widgets/widget.adresse.php | 18 ++++- 5 files changed, 120 insertions(+), 31 deletions(-) diff --git a/classes/Components/I18n/Bootstrap.php b/classes/Components/I18n/Bootstrap.php index f2e321ab..586eb8f2 100644 --- a/classes/Components/I18n/Bootstrap.php +++ b/classes/Components/I18n/Bootstrap.php @@ -23,6 +23,66 @@ final class Bootstrap + /** + * Replaces umlauts with their 2 character representation. + * + * @param string $string + * + * @return array|string|string[] + */ + public static function replaceUmlauts(string $string) + { + $search = ['ä', 'ö', 'ü', 'Ä', 'Ö', 'Ü', 'ß']; + $replace = ['ae', 'oe', 'ue', 'Ae', 'Oe', 'Ue', 'ss']; + return str_replace($search, $replace, $string); + } + + + + /** + * Find the language information from the given string. + * + * @param string $lang + * + * @return array|null + */ + public static function findLanguage(string $lang): ?array + { + $subject = strtolower($lang); + foreach ((new Iso639()) as $key => $val) { + if (array_filter($val, function ($str) use ($subject) { + return $str && ((strtolower($str) == $subject) || (self::replaceUmlauts(strtolower($str)) == $subject)); + })) { + return $val; + } + } + return null; + } + + + + /** + * Find the region information from the given string. + * + * @param string $region + * + * @return array|null + */ + public static function findRegion(string $region): ?array + { + $subject = strtolower($region); + foreach ((new Iso3166()) as $key => $val) { + if (array_filter($val, function ($str) use ($subject) { + return $str && ((strtolower($str) == $subject) || (self::replaceUmlauts(strtolower($str)) == $subject)); + })) { + return $val; + } + } + return null; + } + + + /** * This is the factory for the Localization object. * @@ -51,36 +111,14 @@ final class Bootstrap ['id' => $user->GetAdresse()] ); - // Get language from user account and normalize to 3-letter-code and 2-letter-code - $userSprache = strtolower($user->GetSprache()); - $userLang2 = null; - $userLang3 = null; - foreach ((new Iso639(new Iso639\Filter\CentralEurope())) as $key => $val) { - if (array_filter($val, function ($str) use ($userSprache) { - return $str && (strtolower($str) == $userSprache); - })) { - $userLang2 = $val[Iso639\Key::ALPHA_2]; - $userLang3 = $val[Iso639\Key::ALPHA_3]; - } + if ($lang = self::findLanguage($user->GetSprache())) { + $usersettings['language'] = $lang[Iso639\Key::ALPHA_3]; } - if ($userLang3) { - $usersettings['language'] = $userLang3; - } - // Get region from user account and normalize to 2-letter-code - $userLand = strtolower($userAddress['land'] ?? ''); - $userRegion = null; - foreach ((new Iso3166(new Iso3166\Filter\CentralEurope())) as $key => $val) { - if (array_filter($val, function ($str) use ($userLand) { - return $str && (strtolower($str) == $userLand); - })) { - $userRegion = $val[Iso3166\Key::ALPHA_2]; - } - } - if ($userLang2 && $userRegion) { - $usersettings['locale'] = "{$userLang2}_{$userRegion}"; + if ($lang && ($region = self::findRegion($userAddress['land']))) { + $usersettings['locale'] = "{$lang[Iso639\Key::ALPHA_2]}_{$region[Iso3166\Key::ALPHA_2]}"; } } diff --git a/classes/Components/I18n/Localization.php b/classes/Components/I18n/Localization.php index 9b6ec431..234d479f 100644 --- a/classes/Components/I18n/Localization.php +++ b/classes/Components/I18n/Localization.php @@ -123,7 +123,6 @@ final class Localization implements LocalizationInterface // Set the default locale Locale::setDefault($locale); - // error_log(self::class . ": {$locale}"); } @@ -203,4 +202,36 @@ final class Localization implements LocalizationInterface } + + /** + * Return a new localization object using the given adresse array as source for language and region. + * + * @param array $adresse + * + * @return $this + */ + public function withAdresse(array $adresse): self + { + $localization = clone $this; + + // Find language from address array or keep current language + if (!$lang = Bootstrap::findLanguage($adresse['sprache'])) { + $lang = Bootstrap::findLanguage($this->getLanguage()); + } + if ($lang) { + $localization->setLanguage($lang[Iso639\Key::ALPHA_3]); + } + + // Find region from address or keep current region + if (!$region = Bootstrap::findRegion($adresse['land'])) { + $parsedLocale = Locale::parseLocale($this->getLocale()); + $region = Bootstrap::findRegion($parsedLocale['region']); + } + if ($lang && $region) { + $localization->setLocale("{$lang[Iso639\Key::ALPHA_2]}_{$region[Iso3166\Key::ALPHA_2]}"); + } + + return $localization; + } + } \ No newline at end of file diff --git a/classes/Components/I18n/data/Iso639data.php b/classes/Components/I18n/data/Iso639data.php index 5ff3ed7b..6bfee932 100644 --- a/classes/Components/I18n/data/Iso639data.php +++ b/classes/Components/I18n/data/Iso639data.php @@ -151,5 +151,8 @@ return [ 'NAME_fra' => 'romanche', 'NAME_deu' => 'Rätoromanisch', ], - + 'dut' => ['639-2' => 'dut', '639-1' => 'nl', 'NAME_eng' => 'Dutch', 'NAME_fra' => 'néerlandais', 'NAME_deu' => 'Niederländisch', 'NAME_deu_alt' => 'Holländisch'], + 'swe' => ['639-2' => 'swe', '639-1' => 'sv', 'NAME_eng' => 'Swedish', 'NAME_fra' => 'suédois', 'NAME_deu' => 'Schwedisch'], + 'dan' => ['639-2' => 'dan', '639-1' => 'da', 'NAME_eng' => 'Danish', 'NAME_fra' => 'danois', 'NAME_deu' => 'Dänisch'], + 'nor' => ['639-2' => 'nor', '639-1' => 'no', 'NAME_eng' => 'Norwegian', 'NAME_fra' => 'norvégien', 'NAME_deu' => 'Norwegisch'], ]; diff --git a/www/widgets/templates/_gen/adresse.tpl b/www/widgets/templates/_gen/adresse.tpl index a78b7a56..b1665378 100644 --- a/www/widgets/templates/_gen/adresse.tpl +++ b/www/widgets/templates/_gen/adresse.tpl @@ -149,11 +149,12 @@ $(document).ready(function(){ {|Liefersperre Grund|}:[LIEFERSPERREGRUND][MSGLIEFERSPERREGRUND]
{|Sprache für Belege|}:[SPRACHE][MSGSPRACHE] + {|Sprache und Region|}:[LOCALE][MSGLOCALE] {|Kundenfreigabe|}:[KUNDENFREIGABE][MSGKUNDENFREIGABE]
- {|Folgebestätigungsperre|}:[FOLGEBESTAETIGUNGSPERRE][MSGFOLGEBESTAETIGUNGSPERRE] - {|Trackingmailsperre|}:[TRACKINGSPERRE][MSGTRACKINGSPERRE] + {|Folgebestätigungsperre|}:[FOLGEBESTAETIGUNGSPERRE][MSGFOLGEBESTAETIGUNGSPERRE] + {|Trackingmailsperre|}:[TRACKINGSPERRE][MSGTRACKINGSPERRE] {|Marketingsperre|}:[MARKETINGSPERRE][MSGMARKETINGSPERRE] {|Lead|}:[LEAD][MSGLEAD] diff --git a/www/widgets/widget.adresse.php b/www/widgets/widget.adresse.php index 0a371d14..32e9018b 100644 --- a/www/widgets/widget.adresse.php +++ b/www/widgets/widget.adresse.php @@ -1,4 +1,7 @@ AddOptionsSimpleArray($sprachenOptions); $this->form->NewField($field); - + + /** @var \Xentral\Components\I18n\Localization $localization */ + $localization=$this->app->Container->get('Localization'); + /** @var Database $db */ + $db = $this->app->Container->get('Database'); + $adresse = $db->fetchRow( + $db->select()->cols(['*'])->from('adresse')->where('id=:id'), + ['id' => $id] + ); + $localization=$localization->withAdresse($adresse); + $field = new HTMLInput("locale","text",$localization->getLocale(), size: '10', disabled: 'disabled'); + $this->form->NewField($field); + + $field = new HTMLInput("vorname","hidden",""); $this->form->NewField($field); From 6695369af7a4eef0e1ba5f539db414c52acd727c Mon Sep 17 00:00:00 2001 From: Roland Rusch Date: Mon, 14 Aug 2023 15:10:34 +0200 Subject: [PATCH 4/5] RETROTEC-AG/OpenXE#17 Locale des GUI-Users ermitteln MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Füge Copyright-Hinweise hinzu. --- classes/Components/I18n/Bootstrap.php | 10 ++++++++++ .../Components/I18n/Dataaccess/ArrayAccessTrait.php | 4 ++++ classes/Components/I18n/Dataaccess/CountableTrait.php | 4 ++++ classes/Components/I18n/Dataaccess/DataFilter.php | 4 ++++ .../Components/I18n/Dataaccess/DataFilterInterface.php | 4 ++++ classes/Components/I18n/Dataaccess/DataProvider.php | 4 ++++ .../I18n/Dataaccess/DataProviderInterface.php | 4 ++++ .../I18n/Dataaccess/Exception/OutOfRangeException.php | 4 ++++ classes/Components/I18n/Dataaccess/IteratorTrait.php | 4 ++++ .../I18n/Exception/LanguageNotInitializedException.php | 4 ++++ .../Exception/UnsupportedLocaleStringException.php | 6 ++++++ classes/Components/I18n/Iso3166.php | 5 +++++ classes/Components/I18n/Iso3166/Filter/All.php | 4 ++++ .../Components/I18n/Iso3166/Filter/CentralEurope.php | 4 ++++ classes/Components/I18n/Iso3166/Filter/ChangeKey.php | 4 ++++ classes/Components/I18n/Iso3166/Filter/Custom.php | 4 ++++ classes/Components/I18n/Iso3166/Filter/Europe.php | 4 ++++ classes/Components/I18n/Iso3166/Key.php | 4 ++++ classes/Components/I18n/Iso3166/Name.php | 4 ++++ classes/Components/I18n/Iso639.php | 4 ++++ classes/Components/I18n/Iso639/Filter/All.php | 4 ++++ .../Components/I18n/Iso639/Filter/CentralEurope.php | 4 ++++ classes/Components/I18n/Iso639/Filter/ChangeKey.php | 4 ++++ classes/Components/I18n/Iso639/Filter/Custom.php | 4 ++++ classes/Components/I18n/Iso639/Key.php | 4 ++++ classes/Components/I18n/Iso639/Name.php | 4 ++++ classes/Components/I18n/Localization.php | 9 +++++++++ classes/Components/I18n/LocalizationInterface.php | 4 ++++ classes/Components/I18n/data/Iso3166data.php | 5 +++-- classes/Components/I18n/data/Iso639data.php | 5 +++-- 30 files changed, 132 insertions(+), 4 deletions(-) diff --git a/classes/Components/I18n/Bootstrap.php b/classes/Components/I18n/Bootstrap.php index 586eb8f2..f4a813f0 100644 --- a/classes/Components/I18n/Bootstrap.php +++ b/classes/Components/I18n/Bootstrap.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); @@ -9,6 +13,12 @@ use Xentral\Components\Http\Request; use Xentral\Components\Http\Session\Session; use Xentral\Core\DependencyInjection\ServiceContainer; +/** + * Factory for localization object. + * + * @see Localization + * @author Roland Rusch, easy-smart solution GmbH + */ final class Bootstrap { /** diff --git a/classes/Components/I18n/Dataaccess/ArrayAccessTrait.php b/classes/Components/I18n/Dataaccess/ArrayAccessTrait.php index b32eef00..299fc48e 100644 --- a/classes/Components/I18n/Dataaccess/ArrayAccessTrait.php +++ b/classes/Components/I18n/Dataaccess/ArrayAccessTrait.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Dataaccess/CountableTrait.php b/classes/Components/I18n/Dataaccess/CountableTrait.php index d819e2dc..48257f95 100644 --- a/classes/Components/I18n/Dataaccess/CountableTrait.php +++ b/classes/Components/I18n/Dataaccess/CountableTrait.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Dataaccess/DataFilter.php b/classes/Components/I18n/Dataaccess/DataFilter.php index a1750eba..63de368f 100644 --- a/classes/Components/I18n/Dataaccess/DataFilter.php +++ b/classes/Components/I18n/Dataaccess/DataFilter.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Dataaccess/DataFilterInterface.php b/classes/Components/I18n/Dataaccess/DataFilterInterface.php index 748bb2df..7c816a10 100644 --- a/classes/Components/I18n/Dataaccess/DataFilterInterface.php +++ b/classes/Components/I18n/Dataaccess/DataFilterInterface.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Dataaccess/DataProvider.php b/classes/Components/I18n/Dataaccess/DataProvider.php index fceb0c3f..4459c92a 100644 --- a/classes/Components/I18n/Dataaccess/DataProvider.php +++ b/classes/Components/I18n/Dataaccess/DataProvider.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Dataaccess/DataProviderInterface.php b/classes/Components/I18n/Dataaccess/DataProviderInterface.php index c0f4c4a3..0939ad52 100644 --- a/classes/Components/I18n/Dataaccess/DataProviderInterface.php +++ b/classes/Components/I18n/Dataaccess/DataProviderInterface.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Dataaccess/Exception/OutOfRangeException.php b/classes/Components/I18n/Dataaccess/Exception/OutOfRangeException.php index 16569ecf..dd83c35b 100644 --- a/classes/Components/I18n/Dataaccess/Exception/OutOfRangeException.php +++ b/classes/Components/I18n/Dataaccess/Exception/OutOfRangeException.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Dataaccess/IteratorTrait.php b/classes/Components/I18n/Dataaccess/IteratorTrait.php index e29deb9e..54fb0bfc 100644 --- a/classes/Components/I18n/Dataaccess/IteratorTrait.php +++ b/classes/Components/I18n/Dataaccess/IteratorTrait.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Exception/LanguageNotInitializedException.php b/classes/Components/I18n/Exception/LanguageNotInitializedException.php index b7696797..dc0136ef 100644 --- a/classes/Components/I18n/Exception/LanguageNotInitializedException.php +++ b/classes/Components/I18n/Exception/LanguageNotInitializedException.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Exception/UnsupportedLocaleStringException.php b/classes/Components/I18n/Exception/UnsupportedLocaleStringException.php index 98176e8a..c34bfad5 100644 --- a/classes/Components/I18n/Exception/UnsupportedLocaleStringException.php +++ b/classes/Components/I18n/Exception/UnsupportedLocaleStringException.php @@ -1,4 +1,10 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ + +declare(strict_types=1); namespace Xentral\Components\I18n\Exception; diff --git a/classes/Components/I18n/Iso3166.php b/classes/Components/I18n/Iso3166.php index 17472a0a..e9b83b74 100644 --- a/classes/Components/I18n/Iso3166.php +++ b/classes/Components/I18n/Iso3166.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); @@ -13,6 +17,7 @@ use Xentral\Components\I18n\Dataaccess\DataProvider; * @see https://www.iso.org/iso-3166-country-codes.html * @see DataProvider * @author Roland Rusch, easy-smart solution GmbH + * @license AGPL-3.0-only */ class Iso3166 extends DataProvider { diff --git a/classes/Components/I18n/Iso3166/Filter/All.php b/classes/Components/I18n/Iso3166/Filter/All.php index 3dec30eb..1889dcae 100644 --- a/classes/Components/I18n/Iso3166/Filter/All.php +++ b/classes/Components/I18n/Iso3166/Filter/All.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Iso3166/Filter/CentralEurope.php b/classes/Components/I18n/Iso3166/Filter/CentralEurope.php index 76773d7d..8c755943 100644 --- a/classes/Components/I18n/Iso3166/Filter/CentralEurope.php +++ b/classes/Components/I18n/Iso3166/Filter/CentralEurope.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Iso3166/Filter/ChangeKey.php b/classes/Components/I18n/Iso3166/Filter/ChangeKey.php index 49d279de..23104150 100644 --- a/classes/Components/I18n/Iso3166/Filter/ChangeKey.php +++ b/classes/Components/I18n/Iso3166/Filter/ChangeKey.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Iso3166/Filter/Custom.php b/classes/Components/I18n/Iso3166/Filter/Custom.php index b0f99236..df6a4e99 100644 --- a/classes/Components/I18n/Iso3166/Filter/Custom.php +++ b/classes/Components/I18n/Iso3166/Filter/Custom.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Iso3166/Filter/Europe.php b/classes/Components/I18n/Iso3166/Filter/Europe.php index cfb91f4b..0c7e678e 100644 --- a/classes/Components/I18n/Iso3166/Filter/Europe.php +++ b/classes/Components/I18n/Iso3166/Filter/Europe.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Iso3166/Key.php b/classes/Components/I18n/Iso3166/Key.php index f6d6bf34..bf71f9c5 100644 --- a/classes/Components/I18n/Iso3166/Key.php +++ b/classes/Components/I18n/Iso3166/Key.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Iso3166/Name.php b/classes/Components/I18n/Iso3166/Name.php index ac08ddb8..58141927 100644 --- a/classes/Components/I18n/Iso3166/Name.php +++ b/classes/Components/I18n/Iso3166/Name.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Iso639.php b/classes/Components/I18n/Iso639.php index 19e3e1da..77695ce2 100644 --- a/classes/Components/I18n/Iso639.php +++ b/classes/Components/I18n/Iso639.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Iso639/Filter/All.php b/classes/Components/I18n/Iso639/Filter/All.php index d0c9bb8a..2b05a37a 100644 --- a/classes/Components/I18n/Iso639/Filter/All.php +++ b/classes/Components/I18n/Iso639/Filter/All.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Iso639/Filter/CentralEurope.php b/classes/Components/I18n/Iso639/Filter/CentralEurope.php index 644bf090..94c33c4b 100644 --- a/classes/Components/I18n/Iso639/Filter/CentralEurope.php +++ b/classes/Components/I18n/Iso639/Filter/CentralEurope.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Iso639/Filter/ChangeKey.php b/classes/Components/I18n/Iso639/Filter/ChangeKey.php index b41d4d4b..b4b99278 100644 --- a/classes/Components/I18n/Iso639/Filter/ChangeKey.php +++ b/classes/Components/I18n/Iso639/Filter/ChangeKey.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Iso639/Filter/Custom.php b/classes/Components/I18n/Iso639/Filter/Custom.php index 3c1b8698..0755c290 100644 --- a/classes/Components/I18n/Iso639/Filter/Custom.php +++ b/classes/Components/I18n/Iso639/Filter/Custom.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Iso639/Key.php b/classes/Components/I18n/Iso639/Key.php index 4ef629f6..f916f127 100644 --- a/classes/Components/I18n/Iso639/Key.php +++ b/classes/Components/I18n/Iso639/Key.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Iso639/Name.php b/classes/Components/I18n/Iso639/Name.php index d915d048..ea9e52db 100644 --- a/classes/Components/I18n/Iso639/Name.php +++ b/classes/Components/I18n/Iso639/Name.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/Localization.php b/classes/Components/I18n/Localization.php index 234d479f..853fc103 100644 --- a/classes/Components/I18n/Localization.php +++ b/classes/Components/I18n/Localization.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); @@ -10,6 +14,11 @@ use Xentral\Components\Http\Session\Session; use Xentral\Components\I18n\Exception\LanguageNotInitializedException; use Xentral\Components\I18n\Exception\UnsupportedLocaleStringException; +/** + * Provides a central service for localization. + * + * @author Roland Rusch, easy-smart solution GmbH + */ final class Localization implements LocalizationInterface { private array $config; diff --git a/classes/Components/I18n/LocalizationInterface.php b/classes/Components/I18n/LocalizationInterface.php index 9997a57c..9bb39aaf 100644 --- a/classes/Components/I18n/LocalizationInterface.php +++ b/classes/Components/I18n/LocalizationInterface.php @@ -1,4 +1,8 @@ + * SPDX-License-Identifier: AGPL-3.0-only + */ declare(strict_types=1); diff --git a/classes/Components/I18n/data/Iso3166data.php b/classes/Components/I18n/data/Iso3166data.php index 145a92fe..48ee51ff 100644 --- a/classes/Components/I18n/data/Iso3166data.php +++ b/classes/Components/I18n/data/Iso3166data.php @@ -1,6 +1,7 @@ [ 'A3' => 'ABW', diff --git a/classes/Components/I18n/data/Iso639data.php b/classes/Components/I18n/data/Iso639data.php index 6bfee932..99eada27 100644 --- a/classes/Components/I18n/data/Iso639data.php +++ b/classes/Components/I18n/data/Iso639data.php @@ -1,6 +1,7 @@ [ From 7c4c9e64d604ff0442b511f074294d47c7b11226 Mon Sep 17 00:00:00 2001 From: Roland Rusch Date: Tue, 15 Aug 2023 18:01:05 +0200 Subject: [PATCH 5/5] RETROTEC-AG/OpenXE#17 Locale des GUI-Users ermitteln Systemeinstellungen als default vorgeben --- classes/Components/I18n/Bootstrap.php | 23 ++++++++++++++++++----- classes/Components/I18n/Localization.php | 6 ++---- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/classes/Components/I18n/Bootstrap.php b/classes/Components/I18n/Bootstrap.php index f4a813f0..e0b5fd08 100644 --- a/classes/Components/I18n/Bootstrap.php +++ b/classes/Components/I18n/Bootstrap.php @@ -111,6 +111,19 @@ final class Bootstrap /** @var Database $db */ $db = $container->get('Database'); + $config=[]; + $firmaLang=null; + $firmaRegion=null; + // Get language from system settings and normalize to 3-letter-code and 2-letter-code + if ($firmaLang = self::findLanguage($app->erp->Firmendaten('preferredLanguage'))) { + $config[Localization::LANGUAGE_DEFAULT] = $firmaLang[Iso639\Key::ALPHA_3]; + } + + // Get region from system settings and normalize to 2-letter-code + if ($firmaLang && ($firmaRegion = self::findRegion($app->erp->Firmendaten('land')))) { + $config[Localization::LOCALE_DEFAULT] = "{$firmaLang[Iso639\Key::ALPHA_2]}_{$firmaRegion[Iso3166\Key::ALPHA_2]}"; + } + // Get User $usersettings = []; @@ -122,17 +135,17 @@ final class Bootstrap ); // Get language from user account and normalize to 3-letter-code and 2-letter-code - if ($lang = self::findLanguage($user->GetSprache())) { - $usersettings['language'] = $lang[Iso639\Key::ALPHA_3]; + if ($userLang = self::findLanguage($user->GetSprache())) { + $usersettings['language'] = $userLang[Iso639\Key::ALPHA_3]; } // Get region from user account and normalize to 2-letter-code - if ($lang && ($region = self::findRegion($userAddress['land']))) { - $usersettings['locale'] = "{$lang[Iso639\Key::ALPHA_2]}_{$region[Iso3166\Key::ALPHA_2]}"; + if ($userLang && ($userRegion = self::findRegion($userAddress['land']))) { + $usersettings['locale'] = "{$userLang[Iso639\Key::ALPHA_2]}_{$userRegion[Iso3166\Key::ALPHA_2]}"; } } // Create Localization object - return new Localization($request, $session, $usersettings); + return new Localization($request, $session, $usersettings, $config); } } diff --git a/classes/Components/I18n/Localization.php b/classes/Components/I18n/Localization.php index 853fc103..a29fb7f3 100644 --- a/classes/Components/I18n/Localization.php +++ b/classes/Components/I18n/Localization.php @@ -35,12 +35,12 @@ final class Localization implements LocalizationInterface - public function __construct(?Request $request, ?Session $session, array $usersettings = []) + public function __construct(?Request $request, ?Session $session, array $usersettings = [], array $config = []) { $this->request = $request; $this->session = $session; $this->usersettings = $usersettings; - $this->config = []; + $this->config = $config; $this->process(); } @@ -55,8 +55,6 @@ final class Localization implements LocalizationInterface $langAttrName = $this->config[Localization::LANGUAGE_ATTRIBUTE_NAME] ?? 'language'; $segmentName = 'i18n'; -// $session = $this->session; -// $request = $this->request; // Get the locale from the session, if available if ($this->session && ($locale = $this->session->getValue($segmentName, $localeAttrName))) {