├── .github └── workflows │ └── phpunit.yml ├── .gitignore ├── LICENSE ├── README.md ├── composer.json ├── config └── isocodes.php ├── examples ├── locale_codes.md └── phone_prefixes.md ├── phpunit.xml ├── src ├── Contracts │ ├── ISODataContract.php │ └── ISOModelContract.php ├── Data │ ├── Continents │ │ └── ContinentsEN.php │ ├── Countries │ │ ├── CountriesEN.php │ │ └── CountryCodes.php │ ├── Currencies │ │ ├── CurrenciesEN.php │ │ └── CurrencyNumbers.php │ ├── ISODataBase.php │ └── Languages │ │ └── LanguagesEN.php ├── Enums │ └── NodeResolution.php ├── Exceptions │ ├── ISOModelNotFound.php │ ├── ISONodeAttributeMissing.php │ ├── ISORecordAttributeNotFound.php │ └── ISORecordReadOnlyException.php ├── Facades │ └── ISOCodesFacade.php ├── ISOCodes.php ├── Models │ ├── BasicModelBase.php │ ├── ContinentModel.php │ ├── CountryModel.php │ ├── CurrencyModel.php │ ├── CurrencyNumberModel.php │ ├── Extensions │ │ ├── CollectionMethodCallable.php │ │ └── NodeSearchable.php │ ├── LanguageModel.php │ ├── ModelBase.php │ └── ModelRecord.php └── Providers │ └── ISOCodesProvider.php └── tests └── test ├── CollectionCallableTest.php ├── ContinentsTest.php ├── CountriesTest.php ├── CurrenciesTest.php ├── CurrencyNumbersTest.php ├── ImmutabilityTest.php ├── LanguagesTest.php └── ModelRecordTest.php /.github/workflows/phpunit.yml: -------------------------------------------------------------------------------- 1 | name: Run PHPUnit 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | 7 | jobs: 8 | build: 9 | 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v3 14 | 15 | - name: Validate composer.json and composer.lock 16 | run: composer validate --strict 17 | 18 | - name: Cache Composer packages 19 | id: composer-cache 20 | uses: actions/cache@v3 21 | with: 22 | path: vendor 23 | key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} 24 | restore-keys: | 25 | ${{ runner.os }}-php- 26 | 27 | - name: Install dependencies 28 | run: composer install --prefer-dist --no-progress 29 | 30 | - name: Run test suite 31 | run: composer run-script test 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### JetBrains template 3 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider 4 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 5 | 6 | # User-specific stuff 7 | .idea 8 | 9 | # Gradle and Maven with auto-import 10 | # When using Gradle or Maven with auto-import, you should exclude module files, 11 | # since they will be recreated, and may cause churn. Uncomment if using 12 | # auto-import. 13 | # .idea/artifacts 14 | # .idea/compiler.xml 15 | # .idea/jarRepositories.xml 16 | # .idea/modules.xml 17 | # .idea/*.iml 18 | # .idea/modules 19 | # *.iml 20 | # *.ipr 21 | 22 | # CMake 23 | cmake-build-*/ 24 | 25 | # Mongo Explorer plugin 26 | .idea/**/mongoSettings.xml 27 | 28 | # File-based project format 29 | *.iws 30 | 31 | # IntelliJ 32 | out/ 33 | 34 | # mpeltonen/sbt-idea plugin 35 | .idea_modules/ 36 | 37 | # JIRA plugin 38 | atlassian-ide-plugin.xml 39 | 40 | # Cursive Clojure plugin 41 | .idea/replstate.xml 42 | 43 | # Crashlytics plugin (for Android Studio and IntelliJ) 44 | com_crashlytics_export_strings.xml 45 | crashlytics.properties 46 | crashlytics-build.properties 47 | fabric.properties 48 | 49 | # Editor-based Rest Client 50 | .idea/httpRequests 51 | 52 | # Android studio 3.1+ serialized cache file 53 | .idea/caches/build_file_checksums.ser 54 | 55 | ### macOS template 56 | # General 57 | .DS_Store 58 | .AppleDouble 59 | .LSOverride 60 | 61 | # Icon must end with two \r 62 | Icon 63 | 64 | # Thumbnails 65 | ._* 66 | 67 | # Files that might appear in the root of a volume 68 | .DocumentRevisions-V100 69 | .fseventsd 70 | .Spotlight-V100 71 | .TemporaryItems 72 | .Trashes 73 | .VolumeIcon.icns 74 | .com.apple.timemachine.donotpresent 75 | 76 | # Directories potentially created on remote AFP share 77 | .AppleDB 78 | .AppleDesktop 79 | Network Trash Folder 80 | Temporary Items 81 | .apdisk 82 | 83 | composer.lock 84 | vendor 85 | 86 | # PHPUnit 87 | .phpunit.result.cache 88 | /.phpunit.cache/ 89 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Juan Lago 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Test passed](https://github.com/juanparati/isocodes/actions/workflows/phpunit.yml/badge.svg) 2 | 3 | # 🌐 ISOCodes 4 | 5 | ## What is it? 6 | 7 | A PHP library that provides a list of structured ISO codes oriented to geography/geopolitical information. 8 | 9 | This library provides the following ISOs and codes: 10 | - [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) (Geographical codes) 11 | - [ISO 3166-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) (Geographical codes) 12 | - [Country codes](https://www.iban.com/country-codes) (Geopolitical codes) 13 | - [TLDs](https://en.wikipedia.org/wiki/Country_code_top-level_domain) (Regional TLD) 14 | - [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) (Currency codes) 15 | - [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (Language codes) 16 | - [International dialing codes](https://en.wikipedia.org/wiki/List_of_country_calling_codes) 17 | - [Olson Timezones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) 18 | - [Unicode flags](https://en.wikipedia.org/wiki/Regional_indicator_symbol) 19 | - [European Union Members](https://european-union.europa.eu/principles-countries-history/country-profiles_en) 20 | 21 | This library provides localized names for countries, currencies and languages. The library allows to create custom/new locales. 22 | 23 | RDMS like MySQL or SQLite is not required in order to use this library. All the data is maintained in separate files that are loaded and linked on demand in a way that keeps a low memory footprint. 24 | 25 | ### Disclaimer 26 | 27 | This library data is based on international standards recognized by global organizations, the author is not responsible about how the translations and geopolitical data is represented. 28 | 29 | If you feel that this library data doesn't comply with the geopolitical views required by your project, fell free to [register a custom dataset](#custom-dataset-and-locales). 30 | 31 | ## Composer 32 | 33 | composer require juanparati/iso-codes 34 | 35 | ## Laravel 36 | 37 | This library is compatible with Laravel 8.x+ however it can work as a standalone library. 38 | 39 | ### Facade registration 40 | 41 | 'aliases' => [ 42 | ... 43 | 'ISOCodes' => \Juanparati\ISOCodes\Facades\ISOCodesFacade::class, 44 | ... 45 | ] 46 | 47 | 48 | ### Configuration 49 | 50 | Publish configuration file (Required only when custom dataset or locales are required): 51 | 52 | artisan vendor:publish --provider="Juanparati\ISOCodes\Providers\ISOCodesProvider" 53 | 54 | 55 | ## Usage 56 | 57 | The list of results are returned as [Collections](https://laravel.com/docs/9.x/collections). 58 | 59 | ### Country model examples 60 | 61 | Get the list of all country codes as an array: 62 | 63 | (new ISOCodes)->countries()->toArray(); 64 | 65 | It returns something like this: 66 | 67 | [ 68 | ... 69 | "ES"=> [ 70 | "alpha2" => "ES", 71 | "alpha3" => "ESP", 72 | "numeric" => "724", 73 | "tld" => ".es", 74 | "currencies" => [ 75 | "EUR", 76 | ], 77 | "languages" => [ 78 | "ES", 79 | "CA", 80 | "GL", 81 | "EU", 82 | ], 83 | "continents" => [ 84 | "EU", 85 | ], 86 | "capital" => "Madrid", 87 | "flag" => "🇪🇸", 88 | "phone_code" => "34", 89 | "eu_member" => true, 90 | "name" => "Spain", 91 | "timezones" => [ 92 | "Europe/Madrid", 93 | "Africa/Ceuta", 94 | "Atlantic/Canary", 95 | ] 96 | ] 97 | ... 98 | ]; 99 | 100 | 101 | Retrieve all the countries as a Collection: 102 | 103 | ```php 104 | (new ISOCodes) 105 | ->countries() 106 | ->all(); 107 | ``` 108 | 109 | Retrieve one specific country: 110 | 111 | ```php 112 | (new ISOCodes) 113 | ->countries() 114 | ->firstWhere('alpha2', 'ES'); 115 | ``` 116 | 117 | or using the shortcut 118 | 119 | ```php 120 | (new ISOCodes) 121 | ->countries() 122 | ->findByAlpha2('ES'); 123 | ``` 124 | 125 | Retrieve all the countries located in Europe: 126 | 127 | ```php 128 | (new ISOCodes) 129 | ->countries() 130 | ->whereContinent('EU'); 131 | ``` 132 | 133 | Retrieve all the countries located **only** in Europe: 134 | 135 | ```php 136 | (new ISOCodes) 137 | ->countries() 138 | ->whereContinent('EU', true); 139 | ``` 140 | 141 | Retrieve all the countries located in Europe and Asia: 142 | 143 | ```php 144 | (new ISOCodes) 145 | ->countries() 146 | ->whereContinent(['EU', 'AS'], true); 147 | ``` 148 | 149 | Retrieve all the countries located in Europe **or** Asia 150 | 151 | ```php 152 | (new ISOCodes) 153 | ->countries() 154 | ->whereContinent(['EU', 'AS']); 155 | ``` 156 | 157 | Retrieve all the countries sorted by numeric code descending that uses **only** Euro as currency: 158 | 159 | ```php 160 | (new ISOCodes) 161 | ->countries() 162 | ->all() 163 | ->where('currencies', ['EUR']) 164 | ->sortByDesc('numeric'); 165 | ``` 166 | 167 | or 168 | 169 | ```php 170 | (new ISOCodes) 171 | ->countries() 172 | ->whereCurrency('EUR', true) 173 | ->sortByDesc('numeric'); 174 | ``` 175 | 176 | Retrieve all the countries that uses **at least** Euro as currency: 177 | 178 | ```php 179 | (new ISOCodes) 180 | ->countries() 181 | ->whereCurrency('EUR'); 182 | ``` 183 | 184 | Create a list of countries with their names (useful for generate a listbox options): 185 | 186 | ```php 187 | (new ISOCodes) 188 | ->countries() 189 | ->map(fn ($iso) => [ 190 | 'label' => $iso->name . ' (' . $iso->alpha2 . ')', 191 | 'value' => $iso->alpha2 192 | ]) 193 | ->sortBy('label') 194 | ->values(); 195 | ``` 196 | 197 | Retrieve a list of countries that has Portuguese as one of their official languages: 198 | 199 | ```php 200 | (new ISOCodes) 201 | ->countries() 202 | ->whereLanguage('PT'); 203 | ``` 204 | 205 | * Note that most spoken language of each country should be always the first in the list. 206 | 207 | 208 | ### Language model examples 209 | Get the list grouped by language: 210 | 211 | ```php 212 | (new ISOCodes)->languages()->toArray(); 213 | ``` 214 | 215 | It returns something like: 216 | 217 | [ 218 | ... 219 | "CA" => [ 220 | "code" => "CA", 221 | "name" => "Catalan", 222 | "countries" => [ 223 | [ 224 | "alpha2" => "AD", 225 | "alpha3" => "AND", 226 | "numeric" => "020", 227 | "tld" => ".ad", 228 | "currencies" => [ …1], 229 | "languages" => [ …1], 230 | "continents" => [ …1], 231 | "name" => "Andorra", 232 | "timezones" => [ 233 | "Europe/Andorra" 234 | ] 235 | ], 236 | ... 237 | ], 238 | "currencies" => [ 239 | "EUR", 240 | ], 241 | "continents" => [ 242 | "EU", 243 | ], 244 | ] 245 | ... 246 | ]; 247 | 248 | 249 | ### Continent model examples 250 | 251 | Get the list grouped by continent. 252 | 253 | Example: 254 | 255 | ```php 256 | (new ISOCodes)->continents()->toArray(); 257 | ``` 258 | 259 | 260 | ### Currency model examples 261 | 262 | Get the list grouped by currency. 263 | 264 | Example: 265 | 266 | ```php 267 | (new ISOCodes)->currencies()->toArray(); 268 | ``` 269 | 270 | ### CurrencyNumber model examples 271 | 272 | Get the list grouped by currency number. 273 | 274 | Example: 275 | 276 | ```php 277 | (new ISOCodes)->currencyNumbers()->toArray(); 278 | ``` 279 | 280 | ### Property access 281 | 282 | Each record array member can be accessed using the array and object syntax. 283 | 284 | Example: 285 | 286 | ```php 287 | $spain = (new ISOCodes) 288 | ->countries() 289 | ->findByAlpha2('ES'); 290 | 291 | $spain->name; // Spain 292 | $spain['name']; // Spain 293 | 294 | $spain->toArray(); // Get record as array 295 | $spain->toJson(); // Get record as Json 296 | ``` 297 | 298 | Each record is serializable, that it make it ideal in order to store the results into a cache. 299 | 300 | 301 | ### Use currency numbers instead of currency codes. 302 | 303 | The method `setCurrencyAsNumber` specify if the currency code is returned as a number. 304 | 305 | Example: 306 | 307 | ```php 308 | (new ISOCodes) 309 | ->countries() 310 | ->setCurrencyAsNumber(true) 311 | ->all(); 312 | ``` 313 | 314 | 315 | ### Node resolution 316 | 317 | The method `setResolution` modify how the associated nodes are structured. 318 | 319 | The available nodes are: 320 | - currencies 321 | - languages 322 | - continents 323 | 324 | The available node formats are: 325 | - NODE_AS_CODE: return the values as codes (It is the default resolution) 326 | - NODE_AS_NAME: return the values as the translated values (Example: Instead of 'DA' it returns 'Danish') 327 | - NODE_AS_ALL: return the values as codes and translated values (Example: `['DA' => 'Danish']`) 328 | - NODE_AS_NONE: the associated values are not included. 329 | 330 | Examples: 331 | 332 | ```php 333 | (new ISOCodes) 334 | ->countries() 335 | ->setResolution('currencies', \Juanparati\ISOCodes\Enums\NodeResolution::NODE_AS_ALL) 336 | ->setResolution('languages', \Juanparati\ISOCodes\Enums\NodeResolution::NODE_AS_ALL) 337 | ->setResolution('continents', \Juanparati\ISOCodes\Enums\NodeResolution::NODE_AS_ALL) 338 | ->findByAlpha2('PT') 339 | ->toArray(); 340 | ``` 341 | 342 | returns the following: 343 | 344 | [ 345 | "alpha2" => "PT", 346 | "alpha3" => "PRT", 347 | "numeric" => "620", 348 | "tld" => ".pt", 349 | "currencies" => [ 350 | "EUR" => "Euro", 351 | ], 352 | "languages" => [ 353 | "Portuguese", 354 | ], 355 | "name" => "Portugal", 356 | "capital" => "Lisboa", 357 | "flag" => "🇵🇹", 358 | "phone_code" => "351", 359 | "eu_member" => true, 360 | "timezones" => [ 361 | "Europe/Lisbon", 362 | "Atlantic/Azores", 363 | "Atlantic/Madeira", 364 | ], 365 | ] 366 | 367 | instead of: 368 | 369 | [ 370 | "alpha2" => "PT", 371 | "alpha3" => "PRT", 372 | "numeric" => "620", 373 | "tld" => ".pt", 374 | "currencies" => [ 375 | "EUR", 376 | ], 377 | "languages" => [ 378 | "PT", 379 | ], 380 | "continents" => [ 381 | "EU", 382 | ], 383 | "name" => "Portugal", 384 | "capital" => "Lisboa", 385 | "flag" => "🇵🇹", 386 | "phone_code" => "351", 387 | "eu_member" => true, 388 | "timezones" => [ 389 | "Europe/Lisbon", 390 | "Atlantic/Azores", 391 | "Atlantic/Madeira", 392 | ], 393 | ] 394 | 395 | The node resolutions works with the others models like "currencies", "languages", etc. 396 | 397 | #### Node resolutions and immutability 398 | 399 | When the resolution is changed it will be back to the previous state in the next model call. 400 | 401 | Example: 402 | 403 | ```php 404 | $iso = new ISOCodes(); 405 | 406 | echo $iso->countries() 407 | ->setResolution('currencies', \Juanparati\ISOCodes\Enums\NodeResolution::NODE_AS_ALL) 408 | ->findByAlpha2('PT') 409 | ->currencies[0]; // Returns "Euro" 410 | 411 | echo $iso->countries() 412 | ->findByAlpha2('PT') 413 | ->currencies[0]; // Returns "EUR" 414 | ``` 415 | In order to keep persistent the resolutions it's possible to pass the resolution values to the constructor. Example: 416 | 417 | ```php 418 | $iso = new ISOCodes(new ISOCodes(defaultResolutions: [ 419 | 'currencies' => \Juanparati\ISOCodes\Enums\NodeResolution::NODE_AS_NAME 420 | ]); 421 | ``` 422 | 423 | ## Main language and timezone 424 | 425 | - The more spoken language is displayed first in the list. 426 | - The country capital timezone is displayed first in the list. 427 | 428 | 429 | ## Custom dataset and locales 430 | 431 | It's possible to register custom datasets and locales during the ISOCodes instantiation. 432 | 433 | 434 | Example: 435 | 436 | ```php 437 | new ISOCodes(['countries' => MyCountryTranslation::class]) 438 | ``` 439 | 440 | See the following example with the [country names](./src/Data/Countries/CountriesEN.php). 441 | 442 | 443 | ## Macroable models 444 | 445 | The models are macroable so it's possible to inject custom methods. 446 | 447 | Example: 448 | 449 | ```php 450 | \Juanparati\ISOCodes\Models\CountryModel::macro('allEUMembers', function () { 451 | return $this->where('eu_member', true)->all(); 452 | }); 453 | 454 | (new ISOCodes)->countries()->allEUMembers()->count(); // 27 455 | ``` 456 | 457 | ## Flags representation in client side 458 | 459 | Some operating systems and web browsers may not be able to represent unicode flags due political reasons. I recommend to use the libraries like [country-flag-emoji-polyfill](https://github.com/talkjs/country-flag-emoji-polyfill) in order to provide a graphical representation of the flags in the client side. 460 | 461 | ## Contributions 462 | 463 | Feel free to add new locales to this library and send me a pull request. 464 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "juanparati/iso-codes", 3 | "description": "A PHP library that provides ISO codes, currencies, languages, timezones and additional geopolitical information", 4 | "keywords": [ 5 | "laravel", 6 | "iso", 7 | "countries", 8 | "locales", 9 | "codes", 10 | "regions", 11 | "languages", 12 | "currencies", 13 | "timezones", 14 | "flags" 15 | ], 16 | "type": "library", 17 | "license": "MIT", 18 | "authors": [ 19 | { 20 | "name": "Juan Lago", 21 | "email": "juanparati@gmail.com" 22 | } 23 | ], 24 | "minimum-stability": "stable", 25 | "require": { 26 | "php": ">=8.1", 27 | "ext-ctype": "*", 28 | "illuminate/support": "^8.34.0|^9.0|^10.0|^11.0|^12.0" 29 | }, 30 | "require-dev": { 31 | "phpunit/phpunit": ">=9.5" 32 | }, 33 | "scripts": { 34 | "test": "./vendor/bin/phpunit" 35 | }, 36 | "autoload": { 37 | "psr-4": { 38 | "Juanparati\\ISOCodes\\": "src" 39 | } 40 | }, 41 | "autoload-dev": { 42 | "psr-4": { 43 | "Juanparati\\ISOCodes\\Tests\\": "tests" 44 | } 45 | }, 46 | "extra": { 47 | "laravel": { 48 | "providers": [ 49 | "Juanparati\\ISOCodes\\Providers\\ISOCodesProvider" 50 | ] 51 | }, 52 | "aliases": { 53 | "ISOCodes": "Juanparati\\ISOCodes\\Facades\\ISOCodesFacade" 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /config/isocodes.php: -------------------------------------------------------------------------------- 1 | [ 15 | 'countryCodes' => \Juanparati\ISOCodes\Data\Countries\CountryCodes::class, 16 | 'countries' => \Juanparati\ISOCodes\Data\Countries\CountriesEN::class, 17 | 'currencies' => \Juanparati\ISOCodes\Data\Currencies\CurrenciesEN::class, 18 | 'currencyNumbers'=> \Juanparati\ISOCodes\Data\Currencies\CurrencyNumbers::class, 19 | 'languages' => \Juanparati\ISOCodes\Data\Languages\LanguagesEN::class, 20 | 'continents' => \Juanparati\ISOCodes\Data\Continents\ContinentsEN::class, 21 | ], 22 | 23 | 24 | /* 25 | |-------------------------------------------------------------------------- 26 | | Default resolutions 27 | |-------------------------------------------------------------------------- 28 | | 29 | */ 30 | 'resolutions' => [ 31 | 'currencies' => \Juanparati\ISOCodes\Enums\NodeResolution::NODE_AS_CODE, 32 | 'continents' => \Juanparati\ISOCodes\Enums\NodeResolution::NODE_AS_CODE, 33 | 'languages' => \Juanparati\ISOCodes\Enums\NodeResolution::NODE_AS_CODE, 34 | ], 35 | 36 | 37 | /* 38 | |-------------------------------------------------------------------------- 39 | | Additional options 40 | |-------------------------------------------------------------------------- 41 | | 42 | */ 43 | 'options' => [ 44 | 'currencyAsNumber' => false // Specify if the currency code is returned as a number. 45 | ], 46 | 47 | ]; -------------------------------------------------------------------------------- /examples/locale_codes.md: -------------------------------------------------------------------------------- 1 | # Generate a list of locale codes 2 | 3 | 4 | ```php 5 | \ISOCodes::countries() 6 | ->setResolution('languages', \Juanparati\ISOCodes\Models\CountryModel::NODE_AS_ALL) 7 | ->all() 8 | ->map(function ($r) { 9 | $codes = []; 10 | 11 | foreach ($r->languages as $langCode => $lang) { 12 | $codes[] = [ 13 | 'label' => "$lang ({$r->name})", 14 | 'value' => sprintf("%s_%s", strtolower($langCode), $r->alpha2) 15 | ]; 16 | } 17 | 18 | return $codes; 19 | }) 20 | ->flatten(1) 21 | ->sortBy('label') 22 | ->values(); 23 | ``` 24 | -------------------------------------------------------------------------------- /examples/phone_prefixes.md: -------------------------------------------------------------------------------- 1 | # Generate a list of phone prefixes by country 2 | 3 | ```php 4 | return \ISOCodes::countries() 5 | ->all() 6 | ->sortBy('name') 7 | ->map(fn($r) => [ 8 | 'label' => "+{$r->phone_code} ({$r->name})", 9 | 'value' => "+{$r->phone_code}" 10 | ]) 11 | ->values(); 12 | ``` -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ./tests/test 6 | 7 | 8 | 9 | 10 | src/ 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Contracts/ISODataContract.php: -------------------------------------------------------------------------------- 1 | 'Africa', 16 | 'AN' => 'Antartica', 17 | 'AS' => 'Asia', 18 | 'EU' => 'Europe', 19 | 'NA' => 'North America', 20 | 'OC' => 'Oceania', 21 | 'SA' => 'South America', 22 | ]; 23 | } 24 | -------------------------------------------------------------------------------- /src/Data/Countries/CountriesEN.php: -------------------------------------------------------------------------------- 1 | 'Andorra', 14 | 'AE' => 'United Arab Emirates', 15 | 'AF' => 'Afghanistan', 16 | 'AG' => 'Antigua and Barbuda', 17 | 'AI' => 'Anguilla', 18 | 'AL' => 'Albania', 19 | 'AM' => 'Armenia', 20 | 'AO' => 'Angola', 21 | 'AQ' => 'Antarctica', 22 | 'AR' => 'Argentina', 23 | 'AS' => 'American Samoa', 24 | 'AT' => 'Austria', 25 | 'AU' => 'Australia', 26 | 'AW' => 'Aruba', 27 | 'AX' => 'Åland Islands', 28 | 'AZ' => 'Azerbaijan', 29 | 'BA' => 'Bosnia and Herzegovina', 30 | 'BB' => 'Barbados', 31 | 'BD' => 'Bangladesh', 32 | 'BE' => 'Belgium', 33 | 'BF' => 'Burkina Faso', 34 | 'BG' => 'Bulgaria', 35 | 'BH' => 'Bahrain', 36 | 'BI' => 'Burundi', 37 | 'BJ' => 'Benin', 38 | 'BL' => 'Saint Barthélemy', 39 | 'BM' => 'Bermuda', 40 | 'BN' => 'Brunei Darussalam', 41 | 'BO' => 'Bolivia', 42 | 'BQ' => 'Bonaire', 43 | 'BR' => 'Brazil', 44 | 'BS' => 'Bahamas', 45 | 'BT' => 'Bhutan', 46 | 'BV' => 'Bouvet Island', 47 | 'BW' => 'Botswana', 48 | 'BY' => 'Belarus', 49 | 'BZ' => 'Belize', 50 | 'CA' => 'Canada', 51 | 'CC' => 'Cocos Islands', 52 | 'CD' => 'Congo', 53 | 'CF' => 'Central African Republic', 54 | 'CG' => 'Congo', 55 | 'CH' => 'Switzerland', 56 | 'CI' => 'Côte d\'Ivoire', 57 | 'CK' => 'Cook Islands', 58 | 'CL' => 'Chile', 59 | 'CM' => 'Cameroon', 60 | 'CN' => 'China', 61 | 'CO' => 'Colombia', 62 | 'CR' => 'Costa Rica', 63 | 'CU' => 'Cuba', 64 | 'CV' => 'Cabo Verde', 65 | 'CW' => 'Curaçao', 66 | 'CX' => 'Christmas Island', 67 | 'CY' => 'Cyprus', 68 | 'CZ' => 'Czechia', 69 | 'DE' => 'Germany', 70 | 'DJ' => 'Djibouti', 71 | 'DK' => 'Denmark', 72 | 'DM' => 'Dominica', 73 | 'DO' => 'Dominican Republic', 74 | 'DZ' => 'Algeria', 75 | 'EC' => 'Ecuador', 76 | 'EE' => 'Estonia', 77 | 'EG' => 'Egypt', 78 | 'EH' => 'Western Sahara', 79 | 'ER' => 'Eritrea', 80 | 'ES' => 'Spain', 81 | 'ET' => 'Ethiopia', 82 | 'FI' => 'Finland', 83 | 'FJ' => 'Fiji', 84 | 'FK' => 'Falkland Islands', 85 | 'FM' => 'Micronesia', 86 | 'FO' => 'Faroe Islands', 87 | 'FR' => 'France', 88 | 'GA' => 'Gabon', 89 | 'GB' => 'United Kingdom', 90 | 'GD' => 'Grenada', 91 | 'GE' => 'Georgia', 92 | 'GF' => 'French Guiana', 93 | 'GG' => 'Guernsey', 94 | 'GH' => 'Ghana', 95 | 'GI' => 'Gibraltar', 96 | 'GL' => 'Greenland', 97 | 'GM' => 'Gambia', 98 | 'GN' => 'Guinea', 99 | 'GP' => 'Guadeloupe', 100 | 'GQ' => 'Equatorial Guinea', 101 | 'GR' => 'Greece', 102 | 'GS' => 'South Georgia and the South Sandwich Islands', 103 | 'GT' => 'Guatemala', 104 | 'GU' => 'Guam', 105 | 'GW' => 'Guinea-Bissau', 106 | 'GY' => 'Guyana', 107 | 'HK' => 'Hong Kong', 108 | 'HM' => 'Heard Island and McDonald Islands', 109 | 'HN' => 'Honduras', 110 | 'HR' => 'Croatia', 111 | 'HT' => 'Haiti', 112 | 'HU' => 'Hungary', 113 | 'ID' => 'Indonesia', 114 | 'IE' => 'Ireland', 115 | 'IL' => 'Israel', 116 | 'IM' => 'Isle of Man', 117 | 'IN' => 'India', 118 | 'IO' => 'British Indian Ocean Territory', 119 | 'IQ' => 'Iraq', 120 | 'IR' => 'Iran', 121 | 'IS' => 'Iceland', 122 | 'IT' => 'Italy', 123 | 'JE' => 'Jersey', 124 | 'JM' => 'Jamaica', 125 | 'JO' => 'Jordan', 126 | 'JP' => 'Japan', 127 | 'KE' => 'Kenya', 128 | 'KG' => 'Kyrgyzstan', 129 | 'KH' => 'Cambodia', 130 | 'KI' => 'Kiribati', 131 | 'KM' => 'Comoros', 132 | 'KN' => 'Saint Kitts and Nevis', 133 | 'KP' => 'North Korea', 134 | 'KR' => 'South Korea', 135 | 'KW' => 'Kuwait', 136 | 'KY' => 'Cayman Islands', 137 | 'KZ' => 'Kazakhstan', 138 | 'LA' => 'Laos', 139 | 'LB' => 'Lebanon', 140 | 'LC' => 'Saint Lucia', 141 | 'LI' => 'Liechtenstein', 142 | 'LK' => 'Sri Lanka', 143 | 'LR' => 'Liberia', 144 | 'LS' => 'Lesotho', 145 | 'LT' => 'Lithuania', 146 | 'LU' => 'Luxembourg', 147 | 'LV' => 'Latvia', 148 | 'LY' => 'Libya', 149 | 'MA' => 'Morocco', 150 | 'MC' => 'Monaco', 151 | 'MD' => 'Moldova', 152 | 'ME' => 'Montenegro', 153 | 'MF' => 'Saint Martin', 154 | 'MG' => 'Madagascar', 155 | 'MH' => 'Marshall Islands', 156 | 'MK' => 'North Macedonia', 157 | 'ML' => 'Mali', 158 | 'MM' => 'Myanmar', 159 | 'MN' => 'Mongolia', 160 | 'MO' => 'Macao', 161 | 'MP' => 'Northern Mariana Islands', 162 | 'MQ' => 'Martinique', 163 | 'MR' => 'Mauritania', 164 | 'MS' => 'Montserrat', 165 | 'MT' => 'Malta', 166 | 'MU' => 'Mauritius', 167 | 'MV' => 'Maldives', 168 | 'MW' => 'Malawi', 169 | 'MX' => 'Mexico', 170 | 'MY' => 'Malaysia', 171 | 'MZ' => 'Mozambique', 172 | 'NA' => 'Namibia', 173 | 'NC' => 'New Caledonia', 174 | 'NE' => 'Niger', 175 | 'NF' => 'Norfolk Island', 176 | 'NG' => 'Nigeria', 177 | 'NI' => 'Nicaragua', 178 | 'NL' => 'Netherlands', 179 | 'NO' => 'Norway', 180 | 'NP' => 'Nepal', 181 | 'NR' => 'Nauru', 182 | 'NU' => 'Niue', 183 | 'NZ' => 'New Zealand', 184 | 'OM' => 'Oman', 185 | 'PA' => 'Panama', 186 | 'PE' => 'Peru', 187 | 'PF' => 'French Polynesia', 188 | 'PG' => 'Papua New Guinea', 189 | 'PH' => 'Philippines', 190 | 'PK' => 'Pakistan', 191 | 'PL' => 'Poland', 192 | 'PM' => 'Saint Pierre and Miquelon', 193 | 'PN' => 'Pitcairn', 194 | 'PR' => 'Puerto Rico', 195 | 'PS' => 'Palestine, State of', 196 | 'PT' => 'Portugal', 197 | 'PW' => 'Palau', 198 | 'PY' => 'Paraguay', 199 | 'QA' => 'Qatar', 200 | 'RE' => 'Réunion', 201 | 'RO' => 'Romania', 202 | 'RS' => 'Serbia', 203 | 'RU' => 'Russian Federation', 204 | 'RW' => 'Rwanda', 205 | 'SA' => 'Saudi Arabia', 206 | 'SB' => 'Solomon Islands', 207 | 'SC' => 'Seychelles', 208 | 'SD' => 'Sudan', 209 | 'SE' => 'Sweden', 210 | 'SG' => 'Singapore', 211 | 'SH' => 'Saint Helena, Ascension and Tristan da Cunha', 212 | 'SI' => 'Slovenia', 213 | 'SJ' => 'Svalbard and Jan Mayen', 214 | 'SK' => 'Slovakia', 215 | 'SL' => 'Sierra Leone', 216 | 'SM' => 'San Marino', 217 | 'SN' => 'Senegal', 218 | 'SO' => 'Somalia', 219 | 'SR' => 'Suriname', 220 | 'SS' => 'South Sudan', 221 | 'ST' => 'Sao Tome and Principe', 222 | 'SV' => 'El Salvador', 223 | 'SX' => 'Sint Maarten', 224 | 'SY' => 'Syrian Arab Republic', 225 | 'SZ' => 'Eswatini', 226 | 'TC' => 'Turks and Caicos Islands', 227 | 'TD' => 'Chad', 228 | 'TF' => 'French Southern Territories', 229 | 'TG' => 'Togo', 230 | 'TH' => 'Thailand', 231 | 'TJ' => 'Tajikistan', 232 | 'TK' => 'Tokelau', 233 | 'TL' => 'Timor-Leste', 234 | 'TM' => 'Turkmenistan', 235 | 'TN' => 'Tunisia', 236 | 'TO' => 'Tonga', 237 | 'TR' => 'Turkey', 238 | 'TT' => 'Trinidad and Tobago', 239 | 'TV' => 'Tuvalu', 240 | 'TW' => 'Taiwan', 241 | 'TZ' => 'Tanzania', 242 | 'UA' => 'Ukraine', 243 | 'UG' => 'Uganda', 244 | 'UM' => 'Minor Outlying Islands', 245 | 'US' => 'United States of America', 246 | 'UY' => 'Uruguay', 247 | 'UZ' => 'Uzbekistan', 248 | 'VA' => 'Holy See', 249 | 'VC' => 'Saint Vincent and the Grenadines', 250 | 'VE' => 'Venezuela', 251 | 'VG' => 'Virgin Islands (British)', 252 | 'VI' => 'Virgin Islands (U.S.)', 253 | 'VN' => 'Viet Nam', 254 | 'VU' => 'Vanuatu', 255 | 'WF' => 'Wallis and Futuna', 256 | 'WS' => 'Samoa', 257 | 'YE' => 'Yemen', 258 | 'YT' => 'Mayotte', 259 | 'ZA' => 'South Africa', 260 | 'ZM' => 'Zambia', 261 | 'ZW' => 'Zimbabwe', 262 | ]; 263 | } 264 | -------------------------------------------------------------------------------- /src/Data/Countries/CountryCodes.php: -------------------------------------------------------------------------------- 1 | [ 22 | 'alpha2' => 'AF', 23 | 'alpha3' => 'AFG', 24 | 'numeric' => '004', 25 | 'tld' => '.af', 26 | 'currencies' => ['AFN',], 27 | 'languages' => ['PS'], 28 | 'continents' => ['AS'], 29 | 'capital' => 'Kabul', 30 | 'flag' => '🇦🇫', 31 | 'phone_code' => '93', 32 | 'eu_member' => false, 33 | ], 34 | 'AX' => [ 35 | 'alpha2' => 'AX', 36 | 'alpha3' => 'ALA', 37 | 'numeric' => '248', 38 | 'tld' => '.ax', 39 | 'currencies' => ['EUR',], 40 | 'languages' => ['SV'], 41 | 'continents' => ['EU'], 42 | 'capital' => 'Mariehamn', 43 | 'flag' => '🇦🇽', 44 | 'phone_code' => '358', 45 | 'eu_member' => false, 46 | ], 47 | 'AL' => [ 48 | 'alpha2' => 'AL', 49 | 'alpha3' => 'ALB', 50 | 'numeric' => '008', 51 | 'tld' => '.al', 52 | 'currencies' => ['ALL',], 53 | 'languages' => ['SQ'], 54 | 'continents' => ['EU'], 55 | 'capital' => 'Tirana', 56 | 'flag' => '🇦🇱', 57 | 'phone_code' => '355', 58 | 'eu_member' => false, 59 | ], 60 | 'DZ' => [ 61 | 'alpha2' => 'DZ', 62 | 'alpha3' => 'DZA', 63 | 'numeric' => '012', 64 | 'tld' => '.dz', 65 | 'currencies' => ['DZD',], 66 | 'languages' => ['AR'], 67 | 'continents' => ['AF'], 68 | 'capital' => 'Algiers', 69 | 'flag' => '🇩🇿', 70 | 'phone_code' => '213', 71 | 'eu_member' => false, 72 | ], 73 | 'AS' => [ 74 | 'alpha2' => 'AS', 75 | 'alpha3' => 'ASM', 76 | 'numeric' => '016', 77 | 'tld' => '.as', 78 | 'currencies' => ['USD',], 79 | 'languages' => ['EN'], 80 | 'continents' => ['OC'], 81 | 'capital' => 'Pago Pago', 82 | 'flag' => '🇦🇸', 83 | 'phone_code' => '1684', 84 | 'eu_member' => false, 85 | ], 86 | 'AD' => [ 87 | 'alpha2' => 'AD', 88 | 'alpha3' => 'AND', 89 | 'numeric' => '020', 90 | 'tld' => '.ad', 91 | 'currencies' => ['EUR',], 92 | 'languages' => ['CA'], 93 | 'continents' => ['EU'], 94 | 'capital' => 'Andorra la Vella', 95 | 'flag' => '🇦🇩', 96 | 'phone_code' => '376', 97 | 'eu_member' => false, 98 | ], 99 | 'AO' => [ 100 | 'alpha2' => 'AO', 101 | 'alpha3' => 'AGO', 102 | 'numeric' => '024', 103 | 'tld' => '.ao', 104 | 'currencies' => ['AOA',], 105 | 'languages' => ['PT'], 106 | 'continents' => ['AF'], 107 | 'capital' => 'Luanda', 108 | 'flag' => '🇦🇴', 109 | 'phone_code' => '244', 110 | 'eu_member' => false, 111 | ], 112 | 'AI' => [ 113 | 'alpha2' => 'AI', 114 | 'alpha3' => 'AIA', 115 | 'numeric' => '660', 116 | 'tld' => '.ai', 117 | 'currencies' => ['XCD',], 118 | 'languages' => ['EN'], 119 | 'continents' => ['NA'], 120 | 'capital' => 'The Valley', 121 | 'flag' => '🇦🇮', 122 | 'phone_code' => '1-264', 123 | 'eu_member' => false, 124 | ], 125 | 'AG' => [ 126 | 'alpha2' => 'AG', 127 | 'alpha3' => 'ATG', 128 | 'numeric' => '028', 129 | 'tld' => '.ag', 130 | 'currencies' => ['XCD',], 131 | 'languages' => ['EN'], 132 | 'continents' => ['NA'], 133 | 'capital' => 'Saint John\'s', 134 | 'flag' => '🇦🇬', 135 | 'phone_code' => '1268', 136 | 'eu_member' => false, 137 | ], 138 | 'AR' => [ 139 | 'alpha2' => 'AR', 140 | 'alpha3' => 'ARG', 141 | 'numeric' => '032', 142 | 'tld' => '.ar', 143 | 'currencies' => ['ARS',], 144 | 'languages' => ['ES'], 145 | 'continents' => ['SA'], 146 | 'capital' => 'Buenos Aires', 147 | 'flag' => '🇦🇷', 148 | 'phone_code' => '54', 149 | 'eu_member' => false, 150 | ], 151 | 'AM' => [ 152 | 'alpha2' => 'AM', 153 | 'alpha3' => 'ARM', 154 | 'numeric' => '051', 155 | 'tld' => '.am', 156 | 'currencies' => ['AMD',], 157 | 'languages' => ['HY'], 158 | 'continents' => ['AS'], 159 | 'capital' => 'Yerevan', 160 | 'flag' => '🇦🇲', 161 | 'phone_code' => '374', 162 | 'eu_member' => false, 163 | ], 164 | 'AW' => [ 165 | 'alpha2' => 'AW', 166 | 'alpha3' => 'ABW', 167 | 'numeric' => '533', 168 | 'tld' => '.aw', 169 | 'currencies' => ['AWG',], 170 | 'languages' => ['NL', 'ES'], 171 | 'continents' => ['NA'], 172 | 'capital' => 'Oranjestad', 173 | 'flag' => '🇦🇼', 174 | 'phone_code' => '297', 175 | 'eu_member' => false, 176 | ], 177 | 'AU' => [ 178 | 'alpha2' => 'AU', 179 | 'alpha3' => 'AUS', 180 | 'numeric' => '036', 181 | 'tld' => '.au', 182 | 'currencies' => ['AUD',], 183 | 'languages' => ['EN'], 184 | 'continents' => ['OC'], 185 | 'capital' => 'Canberra', 186 | 'flag' => '🇦🇺', 187 | 'phone_code' => '61', 188 | 'eu_member' => false, 189 | ], 190 | 'AT' => [ 191 | 'alpha2' => 'AT', 192 | 'alpha3' => 'AUT', 193 | 'numeric' => '040', 194 | 'tld' => '.at', 195 | 'currencies' => ['EUR',], 196 | 'languages' => ['DE'], 197 | 'continents' => ['EU'], 198 | 'capital' => 'Vienna', 199 | 'flag' => '🇦🇹', 200 | 'phone_code' => '43', 201 | 'eu_member' => true, 202 | ], 203 | 'AZ' => [ 204 | 'alpha2' => 'AZ', 205 | 'alpha3' => 'AZE', 206 | 'numeric' => '031', 207 | 'tld' => '.az', 208 | 'currencies' => ['AZN',], 209 | 'languages' => ['AZ'], 210 | 'continents' => ['AS'], 211 | 'capital' => 'Baku', 212 | 'flag' => '🇦🇿', 213 | 'phone_code' => '994', 214 | 'eu_member' => false, 215 | ], 216 | 'BS' => [ 217 | 'alpha2' => 'BS', 218 | 'alpha3' => 'BHS', 219 | 'numeric' => '044', 220 | 'tld' => '.bs', 221 | 'currencies' => ['BSD',], 222 | 'languages' => ['EN'], 223 | 'continents' => ['NA'], 224 | 'capital' => 'Nassau', 225 | 'flag' => '🇧🇸', 226 | 'phone_code' => '1242', 227 | 'eu_member' => false, 228 | ], 229 | 'BH' => [ 230 | 'alpha2' => 'BH', 231 | 'alpha3' => 'BHR', 232 | 'numeric' => '048', 233 | 'tld' => '.bh', 234 | 'currencies' => ['BHD',], 235 | 'languages' => ['AR'], 236 | 'continents' => ['AS'], 237 | 'capital' => 'Manama', 238 | 'flag' => '🇧🇭', 239 | 'phone_code' => '973', 240 | 'eu_member' => false, 241 | ], 242 | 'BD' => [ 243 | 'alpha2' => 'BD', 244 | 'alpha3' => 'BGD', 245 | 'numeric' => '050', 246 | 'tld' => '.bd', 247 | 'currencies' => ['BDT',], 248 | 'languages' => ['BN'], 249 | 'continents' => ['AS'], 250 | 'capital' => 'Dhaka', 251 | 'flag' => '🇧🇩', 252 | 'phone_code' => '880', 253 | 'eu_member' => false, 254 | ], 255 | 'BB' => [ 256 | 'alpha2' => 'BB', 257 | 'alpha3' => 'BRB', 258 | 'numeric' => '052', 259 | 'tld' => '.bb', 260 | 'currencies' => ['BBD',], 261 | 'languages' => ['EN'], 262 | 'continents' => ['NA'], 263 | 'capital' => 'Bridgetown', 264 | 'flag' => '🇧🇧', 265 | 'phone_code' => '1246', 266 | 'eu_member' => false, 267 | ], 268 | 'BY' => [ 269 | 'alpha2' => 'BY', 270 | 'alpha3' => 'BLR', 271 | 'numeric' => '112', 272 | 'tld' => '.by', 273 | 'currencies' => ['BYN',], 274 | 'languages' => ['BE', 'RU'], 275 | 'continents' => ['EU'], 276 | 'capital' => 'Minsk', 277 | 'flag' => '🇱🇾', 278 | 'phone_code' => '218', 279 | 'eu_member' => false, 280 | ], 281 | 'BE' => [ 282 | 'alpha2' => 'BE', 283 | 'alpha3' => 'BEL', 284 | 'numeric' => '056', 285 | 'tld' => '.be', 286 | 'currencies' => ['EUR',], 287 | 'languages' => ['NL', 'FR', 'DE'], 288 | 'continents' => ['EU'], 289 | 'capital' => 'Brussels', 290 | 'flag' => '🇧🇪', 291 | 'phone_code' => '32', 292 | 'eu_member' => true, 293 | ], 294 | 'BZ' => [ 295 | 'alpha2' => 'BZ', 296 | 'alpha3' => 'BLZ', 297 | 'numeric' => '084', 298 | 'tld' => '.bz', 299 | 'currencies' => ['BZD',], 300 | 'languages' => ['EN'], 301 | 'continents' => ['NA'], 302 | 'capital' => 'Belmopan', 303 | 'flag' => '🇧🇿', 304 | 'phone_code' => '501', 305 | 'eu_member' => false, 306 | ], 307 | 'BJ' => [ 308 | 'alpha2' => 'BJ', 309 | 'alpha3' => 'BEN', 310 | 'numeric' => '204', 311 | 'tld' => '.bj', 312 | 'currencies' => ['XOF',], 313 | 'languages' => ['FR'], 314 | 'continents' => ['AF'], 315 | 'capital' => 'Porto-Novo', 316 | 'flag' => '🇧🇯', 317 | 'phone_code' => '229', 318 | 'eu_member' => false, 319 | ], 320 | 'BM' => [ 321 | 'alpha2' => 'BM', 322 | 'alpha3' => 'BMU', 323 | 'numeric' => '060', 324 | 'tld' => '.bm', 325 | 'currencies' => ['BMD',], 326 | 'languages' => ['EN'], 327 | 'continents' => ['NA'], 328 | 'capital' => 'Hamilton', 329 | 'flag' => '🇧🇲', 330 | 'phone_code' => '1441', 331 | 'eu_member' => false, 332 | ], 333 | 'BT' => [ 334 | 'alpha2' => 'BT', 335 | 'alpha3' => 'BTN', 336 | 'numeric' => '064', 337 | 'tld' => '.bt', 338 | 'currencies' => ['BTN',], 339 | 'languages' => ['DZ'], 340 | 'continents' => ['AS'], 341 | 'capital' => 'Thimphu', 342 | 'flag' => '🇧🇹', 343 | 'phone_code' => '975', 344 | 'eu_member' => false, 345 | ], 346 | 'BO' => [ 347 | 'alpha2' => 'BO', 348 | 'alpha3' => 'BOL', 349 | 'numeric' => '068', 350 | 'tld' => '.bo', 351 | 'currencies' => ['BOB',], 352 | 'languages' => ['ES'], 353 | 'continents' => ['SA'], 354 | 'capital' => 'Sucre', 355 | 'flag' => '🇧🇴', 356 | 'phone_code' => '591', 357 | 'eu_member' => false, 358 | ], 359 | 'BQ' => [ 360 | 'alpha2' => 'BQ', 361 | 'alpha3' => 'BES', 362 | 'numeric' => '535', 363 | 'tld' => '.bq', 364 | 'currencies' => ['USD',], 365 | 'languages' => ['NL'], 366 | 'continents' => ['SA'], 367 | 'capital' => 'Kralendijk', 368 | 'flag' => '🇧🇶', 369 | 'phone_code' => '599-7', 370 | 'eu_member' => false, 371 | ], 372 | 'BA' => [ 373 | 'alpha2' => 'BA', 374 | 'alpha3' => 'BIH', 375 | 'numeric' => '070', 376 | 'tld' => '.ba', 377 | 'currencies' => ['BAM',], 378 | 'languages' => ['BS', 'HR', 'SR'], 379 | 'continents' => ['EU'], 380 | 'capital' => 'Sarajevo', 381 | 'flag' => '🇧🇦', 382 | 'phone_code' => '387', 383 | 'eu_member' => false, 384 | ], 385 | 'BW' => [ 386 | 'alpha2' => 'BW', 387 | 'alpha3' => 'BWA', 388 | 'numeric' => '072', 389 | 'tld' => '.bw', 390 | 'currencies' => ['BWP',], 391 | 'languages' => ['EN', 'TN'], 392 | 'continents' => ['AF'], 393 | 'capital' => 'Gaborone', 394 | 'flag' => '🇧🇼', 395 | 'phone_code' => '267', 396 | 'eu_member' => false, 397 | ], 398 | 'BV' => [ 399 | 'alpha2' => 'BV', 400 | 'alpha3' => 'BVT', 401 | 'numeric' => '074', 402 | 'tld' => '.bv', 403 | 'currencies' => ['NOK',], 404 | 'languages' => ['NO'], 405 | 'continents' => ['AN'], 406 | 'capital' => null, 407 | 'flag' => '🇧🇻', 408 | 'phone_code' => NULL, 409 | 'eu_member' => false, 410 | ], 411 | 'BR' => [ 412 | 'alpha2' => 'BR', 413 | 'alpha3' => 'BRA', 414 | 'numeric' => '076', 415 | 'tld' => '.br', 416 | 'currencies' => ['BRL',], 417 | 'languages' => ['PT'], 418 | 'continents' => ['SA'], 419 | 'capital' => 'Brasília', 420 | 'flag' => '🇧🇷', 421 | 'phone_code' => '55', 422 | 'eu_member' => false, 423 | ], 424 | 'IO' => [ 425 | 'alpha2' => 'IO', 426 | 'alpha3' => 'IOT', 427 | 'numeric' => '086', 428 | 'tld' => '.io', 429 | 'currencies' => ['GBP',], 430 | 'languages' => ['EN'], 431 | 'continents' => ['OC'], 432 | 'capital' => 'Diego Garcia', 433 | 'flag' => '🇮🇴', 434 | 'phone_code' => '246', 435 | 'eu_member' => false, 436 | ], 437 | 'BN' => [ 438 | 'alpha2' => 'BN', 439 | 'alpha3' => 'BRN', 440 | 'numeric' => '096', 441 | 'tld' => '.bn', 442 | 'currencies' => ['BND', 'SGD',], 443 | 'languages' => ['MS', 'EN'], 444 | 'continents' => ['AS'], 445 | 'capital' => 'Bandar Seri Begawan', 446 | 'flag' => '🇧🇳', 447 | 'phone_code' => '673', 448 | 'eu_member' => false, 449 | ], 450 | 'BG' => [ 451 | 'alpha2' => 'BG', 452 | 'alpha3' => 'BGR', 453 | 'numeric' => '100', 454 | 'tld' => '.bg', 455 | 'currencies' => ['BGN',], 456 | 'languages' => ['BG'], 457 | 'continents' => ['EU'], 458 | 'capital' => 'Sofia', 459 | 'flag' => '🇧🇬', 460 | 'phone_code' => '359', 461 | 'eu_member' => true, 462 | ], 463 | 'BF' => [ 464 | 'alpha2' => 'BF', 465 | 'alpha3' => 'BFA', 466 | 'numeric' => '854', 467 | 'tld' => '.bf', 468 | 'currencies' => ['XOF',], 469 | 'languages' => ['FR'], 470 | 'continents' => ['AF'], 471 | 'capital' => 'Ouagadougou', 472 | 'flag' => '🇧🇫', 473 | 'phone_code' => '226', 474 | 'eu_member' => false, 475 | ], 476 | 'BI' => [ 477 | 'alpha2' => 'BI', 478 | 'alpha3' => 'BDI', 479 | 'numeric' => '108', 480 | 'tld' => '.bi', 481 | 'currencies' => ['BIF',], 482 | 'languages' => ['FR', 'RN', 'EN'], 483 | 'continents' => ['AF'], 484 | 'capital' => 'Bujumbura', 485 | 'flag' => '🇧🇮', 486 | 'phone_code' => '257', 487 | 'eu_member' => false, 488 | ], 489 | 'CV' => [ 490 | 'alpha2' => 'CV', 491 | 'alpha3' => 'CPV', 492 | 'numeric' => '132', 493 | 'tld' => '.cv', 494 | 'currencies' => ['CVE',], 495 | 'languages' => ['PT'], 496 | 'continents' => ['AF'], 497 | 'capital' => 'Praia', 498 | 'flag' => '🇨🇻', 499 | 'phone_code' => '238', 500 | 'eu_member' => false, 501 | ], 502 | 'KH' => [ 503 | 'alpha2' => 'KH', 504 | 'alpha3' => 'KHM', 505 | 'numeric' => '116', 506 | 'tld' => '.kh', 507 | 'currencies' => ['KHR',], 508 | 'languages' => ['KM'], 509 | 'continents' => ['AS'], 510 | 'capital' => 'Phnom Penh', 511 | 'flag' => '🇰🇭', 512 | 'phone_code' => '855', 513 | 'eu_member' => false, 514 | ], 515 | 'CM' => [ 516 | 'alpha2' => 'CM', 517 | 'alpha3' => 'CMR', 518 | 'numeric' => '120', 519 | 'tld' => '.cm', 520 | 'currencies' => ['XAF',], 521 | 'languages' => ['EN', 'FR'], 522 | 'continents' => ['AF'], 523 | 'capital' => 'Yaoundé', 524 | 'flag' => '🇨🇲', 525 | 'phone_code' => '237', 526 | 'eu_member' => false, 527 | ], 528 | 'CA' => [ 529 | 'alpha2' => 'CA', 530 | 'alpha3' => 'CAN', 531 | 'numeric' => '124', 532 | 'tld' => '.ca', 533 | 'currencies' => ['CAD',], 534 | 'languages' => ['EN', 'FR'], 535 | 'continents' => ['NA'], 536 | 'capital' => 'Ottawa', 537 | 'flag' => '🇨🇦', 538 | 'phone_code' => '1', 539 | 'eu_member' => false, 540 | ], 541 | 'KY' => [ 542 | 'alpha2' => 'KY', 543 | 'alpha3' => 'CYM', 544 | 'numeric' => '136', 545 | 'tld' => '.ky', 546 | 'currencies' => ['KYD',], 547 | 'languages' => ['EN'], 548 | 'continents' => ['NA'], 549 | 'capital' => 'George Town', 550 | 'flag' => '🇰🇾', 551 | 'phone_code' => '1345', 552 | 'eu_member' => false, 553 | ], 554 | 'CF' => [ 555 | 'alpha2' => 'CF', 556 | 'alpha3' => 'CAF', 557 | 'numeric' => '140', 558 | 'tld' => '.cf', 559 | 'currencies' => ['XAF',], 560 | 'languages' => ['FR'], 561 | 'continents' => ['AF'], 562 | 'capital' => 'Bangui', 563 | 'flag' => '🇨🇫', 564 | 'phone_code' => '236', 565 | 'eu_member' => false, 566 | ], 567 | 'TD' => [ 568 | 'alpha2' => 'TD', 569 | 'alpha3' => 'TCD', 570 | 'numeric' => '148', 571 | 'tld' => '.td', 572 | 'currencies' => ['XAF',], 573 | 'languages' => ['AR', 'FR'], 574 | 'continents' => ['AF'], 575 | 'capital' => 'N\'Djamena', 576 | 'flag' => '🇹🇩', 577 | 'phone_code' => '235', 578 | 'eu_member' => false, 579 | ], 580 | 'CL' => [ 581 | 'alpha2' => 'CL', 582 | 'alpha3' => 'CHL', 583 | 'numeric' => '152', 584 | 'tld' => '.cl', 585 | 'currencies' => ['CLP',], 586 | 'languages' => ['ES'], 587 | 'continents' => ['NA'], 588 | 'capital' => 'Santiago', 589 | 'flag' => '🇨🇱', 590 | 'phone_code' => '56', 591 | 'eu_member' => false, 592 | ], 593 | 'CN' => [ 594 | 'alpha2' => 'CN', 595 | 'alpha3' => 'CHN', 596 | 'numeric' => '156', 597 | 'tld' => '.cn', 598 | 'currencies' => ['CNY',], 599 | 'languages' => ['ZH'], 600 | 'continents' => ['AS'], 601 | 'capital' => 'Beijing', 602 | 'flag' => '🇨🇳', 603 | 'phone_code' => '86', 604 | 'eu_member' => false, 605 | ], 606 | 'CX' => [ 607 | 'alpha2' => 'CX', 608 | 'alpha3' => 'CXR', 609 | 'numeric' => '162', 610 | 'tld' => '.cx', 611 | 'currencies' => ['AUD',], 612 | 'languages' => ['EN', 'ZH', 'MS'], 613 | 'continents' => ['AS'], 614 | 'capital' => 'Flying Fish Cove', 615 | 'flag' => '🇨🇽', 616 | 'phone_code' => '61', 617 | 'eu_member' => false, 618 | ], 619 | 'CC' => [ 620 | 'alpha2' => 'CC', 621 | 'alpha3' => 'CCK', 622 | 'numeric' => '166', 623 | 'tld' => '.cc', 624 | 'currencies' => ['AUD',], 625 | 'languages' => ['EN', 'MS'], 626 | 'continents' => ['AS'], 627 | 'capital' => 'West Island', 628 | 'flag' => '🇨🇨', 629 | 'phone_code' => '61', 630 | 'eu_member' => false, 631 | ], 632 | 'CO' => [ 633 | 'alpha2' => 'CO', 634 | 'alpha3' => 'COL', 635 | 'numeric' => '170', 636 | 'tld' => '.co', 637 | 'currencies' => ['COP',], 638 | 'languages' => ['ES'], 639 | 'continents' => ['SA'], 640 | 'capital' => 'Bogotá', 641 | 'flag' => '🇨🇴', 642 | 'phone_code' => '57', 643 | 'eu_member' => false, 644 | ], 645 | 'KM' => [ 646 | 'alpha2' => 'KM', 647 | 'alpha3' => 'COM', 648 | 'numeric' => '174', 649 | 'tld' => '.km', 650 | 'currencies' => ['KMF',], 651 | 'languages' => ['AR', 'FR'], 652 | 'continents' => ['AF'], 653 | 'capital' => 'Moroni', 654 | 'flag' => '🇰🇲', 655 | 'phone_code' => '269', 656 | 'eu_member' => false, 657 | ], 658 | 'CG' => [ 659 | 'alpha2' => 'CG', 660 | 'alpha3' => 'COG', 661 | 'numeric' => '178', 662 | 'tld' => '.cg', 663 | 'currencies' => ['XAF',], 664 | 'languages' => ['FR'], 665 | 'continents' => ['AF'], 666 | 'capital' => 'Brazzaville', 667 | 'flag' => '🇨🇬', 668 | 'phone_code' => '242', 669 | 'eu_member' => false, 670 | ], 671 | 'CD' => [ 672 | 'alpha2' => 'CD', 673 | 'alpha3' => 'COD', 674 | 'numeric' => '180', 675 | 'tld' => '.cd', 676 | 'currencies' => ['CDF',], 677 | 'languages' => ['FR'], 678 | 'continents' => ['AF'], 679 | 'capital' => 'Kinshasa', 680 | 'flag' => '🇨🇩', 681 | 'phone_code' => '243', 682 | 'eu_member' => false, 683 | ], 684 | 'CK' => [ 685 | 'alpha2' => 'CK', 686 | 'alpha3' => 'COK', 687 | 'numeric' => '184', 688 | 'tld' => '.ck', 689 | 'currencies' => ['NZD',], 690 | 'languages' => ['EN'], 691 | 'continents' => ['OC'], 692 | 'capital' => 'Avarua', 693 | 'flag' => '🇨🇰', 694 | 'phone_code' => '682', 695 | 'eu_member' => false, 696 | ], 697 | 'CR' => [ 698 | 'alpha2' => 'CR', 699 | 'alpha3' => 'CRI', 700 | 'numeric' => '188', 701 | 'tld' => '.cr', 702 | 'currencies' => ['CRC',], 703 | 'languages' => ['ES'], 704 | 'continents' => ['NA'], 705 | 'capital' => 'San José', 706 | 'flag' => '🇨🇷', 707 | 'phone_code' => '506', 708 | 'eu_member' => false, 709 | ], 710 | 'CI' => [ 711 | 'alpha2' => 'CI', 712 | 'alpha3' => 'CIV', 713 | 'numeric' => '384', 714 | 'tld' => '.ci', 715 | 'currencies' => ['XOF',], 716 | 'languages' => ['FR'], 717 | 'continents' => ['AF'], 718 | 'capital' => 'Yamoussoukro', 719 | 'flag' => '🇨🇮', 720 | 'phone_code' => '225', 721 | 'eu_member' => false, 722 | ], 723 | 'HR' => [ 724 | 'alpha2' => 'HR', 725 | 'alpha3' => 'HRV', 726 | 'numeric' => '191', 727 | 'tld' => '.hr', 728 | 'currencies' => ['EUR','HRK',], 729 | 'languages' => ['HR', 'SR', 'HU', 'CS', 'SK'], 730 | 'continents' => ['EU'], 731 | 'capital' => 'Zagreb', 732 | 'flag' => '🇭🇷', 733 | 'phone_code' => '385', 734 | 'eu_member' => true, 735 | ], 736 | 'CU' => [ 737 | 'alpha2' => 'CU', 738 | 'alpha3' => 'CUB', 739 | 'numeric' => '192', 740 | 'tld' => '.cu', 741 | 'currencies' => ['CUC', 'CUP',], 742 | 'languages' => ['ES'], 743 | 'continents' => ['NA'], 744 | 'capital' => 'Havana', 745 | 'flag' => '🇨🇺', 746 | 'phone_code' => '53', 747 | 'eu_member' => false, 748 | ], 749 | 'CW' => [ 750 | 'alpha2' => 'CW', 751 | 'alpha3' => 'CUW', 752 | 'numeric' => '531', 753 | 'tld' => '.cw', 754 | 'currencies' => ['ANG',], 755 | 'languages' => ['NL', 'EN'], 756 | 'continents' => ['NA'], 757 | 'capital' => 'Willemstad', 758 | 'flag' => '🇨🇼', 759 | 'phone_code' => '5999', 760 | 'eu_member' => false, 761 | ], 762 | 'CY' => [ 763 | 'alpha2' => 'CY', 764 | 'alpha3' => 'CYP', 765 | 'numeric' => '196', 766 | 'tld' => '.cy', 767 | 'currencies' => ['EUR',], 768 | 'languages' => ['EL', 'TR'], 769 | 'continents' => ['AS'], 770 | 'capital' => 'Nicosia', 771 | 'flag' => '🇨🇾', 772 | 'phone_code' => '357', 773 | 'eu_member' => true, 774 | ], 775 | 'CZ' => [ 776 | 'alpha2' => 'CZ', 777 | 'alpha3' => 'CZE', 778 | 'numeric' => '203', 779 | 'tld' => '.cz', 780 | 'currencies' => ['CZK',], 781 | 'languages' => ['CS', 'SK'], 782 | 'continents' => ['EU'], 783 | 'capital' => 'Prague', 784 | 'flag' => '🇨🇿', 785 | 'phone_code' => '420', 786 | 'eu_member' => true, 787 | ], 788 | 'DK' => [ 789 | 'alpha2' => 'DK', 790 | 'alpha3' => 'DNK', 791 | 'numeric' => '208', 792 | 'tld' => '.dk', 793 | 'currencies' => ['DKK',], 794 | 'languages' => ['DA'], 795 | 'continents' => ['EU'], 796 | 'capital' => 'Copenhagen', 797 | 'flag' => '🇩🇰', 798 | 'phone_code' => '45', 799 | 'eu_member' => true, 800 | ], 801 | 'DJ' => [ 802 | 'alpha2' => 'DJ', 803 | 'alpha3' => 'DJI', 804 | 'numeric' => '262', 805 | 'tld' => '.dj', 806 | 'currencies' => ['DJF',], 807 | 'languages' => ['AR', 'FR'], 808 | 'continents' => ['AF'], 809 | 'capital' => 'Djibouti', 810 | 'flag' => '🇩🇯', 811 | 'phone_code' => '253', 812 | 'eu_member' => false, 813 | ], 814 | 'DM' => [ 815 | 'alpha2' => 'DM', 816 | 'alpha3' => 'DMA', 817 | 'numeric' => '212', 818 | 'tld' => '.dm', 819 | 'currencies' => ['XCD',], 820 | 'languages' => ['EN'], 821 | 'continents' => ['NA'], 822 | 'capital' => 'Roseau', 823 | 'flag' => '🇩🇲', 824 | 'phone_code' => '1767', 825 | 'eu_member' => false, 826 | ], 827 | 'DO' => [ 828 | 'alpha2' => 'DO', 829 | 'alpha3' => 'DOM', 830 | 'numeric' => '214', 831 | 'tld' => '.do', 832 | 'currencies' => ['DOP',], 833 | 'languages' => ['ES'], 834 | 'continents' => ['NA'], 835 | 'capital' => 'Santo Domingo', 836 | 'flag' => '🇩🇴', 837 | 'phone_code' => '1809', 838 | 'eu_member' => false, 839 | ], 840 | 'EC' => [ 841 | 'alpha2' => 'EC', 842 | 'alpha3' => 'ECU', 843 | 'numeric' => '218', 844 | 'tld' => '.ec', 845 | 'currencies' => ['USD',], 846 | 'languages' => ['ES'], 847 | 'continents' => ['SA'], 848 | 'capital' => 'Quito', 849 | 'flag' => '🇪🇨', 850 | 'phone_code' => '593', 851 | 'eu_member' => false, 852 | ], 853 | 'EG' => [ 854 | 'alpha2' => 'EG', 855 | 'alpha3' => 'EGY', 856 | 'numeric' => '818', 857 | 'tld' => '.eg', 858 | 'currencies' => ['EGP',], 859 | 'languages' => ['AR'], 860 | 'continents' => ['AS'], 861 | 'capital' => 'Cairo', 862 | 'flag' => '🇪🇬', 863 | 'phone_code' => '20', 864 | 'eu_member' => false, 865 | ], 866 | 'SV' => [ 867 | 'alpha2' => 'SV', 868 | 'alpha3' => 'SLV', 869 | 'numeric' => '222', 870 | 'tld' => '.sv', 871 | 'currencies' => ['USD',], 872 | 'languages' => ['ES'], 873 | 'continents' => ['SA'], 874 | 'capital' => 'San Salvador', 875 | 'flag' => '🇸🇻', 876 | 'phone_code' => '503', 877 | 'eu_member' => false, 878 | ], 879 | 'GQ' => [ 880 | 'alpha2' => 'GQ', 881 | 'alpha3' => 'GNQ', 882 | 'numeric' => '226', 883 | 'tld' => '.gq', 884 | 'currencies' => ['XAF',], 885 | 'languages' => ['FR', 'PT', 'ES'], 886 | 'continents' => ['AF'], 887 | 'capital' => 'Malabo', 888 | 'flag' => '🇬🇶', 889 | 'phone_code' => '240', 890 | 'eu_member' => false, 891 | ], 892 | 'ER' => [ 893 | 'alpha2' => 'ER', 894 | 'alpha3' => 'ERI', 895 | 'numeric' => '232', 896 | 'tld' => '.er', 897 | 'currencies' => ['ERN',], 898 | 'languages' => ['MS', 'EN'], 899 | 'continents' => ['AF'], 900 | 'capital' => 'Asmara', 901 | 'flag' => '🇪🇷', 902 | 'phone_code' => '291', 903 | 'eu_member' => false, 904 | ], 905 | 'EE' => [ 906 | 'alpha2' => 'EE', 907 | 'alpha3' => 'EST', 908 | 'numeric' => '233', 909 | 'tld' => '.ee', 910 | 'currencies' => ['EUR',], 911 | 'languages' => ['ET'], 912 | 'continents' => ['EU'], 913 | 'capital' => 'Tallinn', 914 | 'flag' => '🇪🇪', 915 | 'phone_code' => '372', 916 | 'eu_member' => true, 917 | ], 918 | 'ET' => [ 919 | 'alpha2' => 'ET', 920 | 'alpha3' => 'ETH', 921 | 'numeric' => '231', 922 | 'tld' => '.et', 923 | 'currencies' => ['ETB',], 924 | 'languages' => ['AA', 'AM', 'OM', 'SO', 'TI'], 925 | 'continents' => ['AF'], 926 | 'capital' => 'Addis Ababa', 927 | 'flag' => '🇪🇹', 928 | 'phone_code' => '251', 929 | 'eu_member' => false, 930 | ], 931 | 'SZ' => [ 932 | 'alpha2' => 'SZ', 933 | 'alpha3' => 'SWZ', 934 | 'numeric' => '748', 935 | 'tld' => '.sz', 936 | 'currencies' => ['SZL', 'ZAR',], 937 | 'languages' => ['EN', 'SS'], 938 | 'continents' => ['AF'], 939 | 'capital' => 'Lobamba', 940 | 'flag' => '🇸🇿', 941 | 'phone_code' => '268', 942 | 'eu_member' => false, 943 | ], 944 | 'FK' => [ 945 | 'alpha2' => 'FK', 946 | 'alpha3' => 'FLK', 947 | 'numeric' => '238', 948 | 'tld' => '.fk', 949 | 'currencies' => ['FKP',], 950 | 'languages' => ['EN'], 951 | 'continents' => ['SA'], 952 | 'capital' => 'Stanley', 953 | 'flag' => '🇫🇰', 954 | 'phone_code' => '500', 955 | 'eu_member' => false, 956 | ], 957 | 'FO' => [ 958 | 'alpha2' => 'FO', 959 | 'alpha3' => 'FRO', 960 | 'numeric' => '234', 961 | 'tld' => '.fo', 962 | 'currencies' => ['DKK',], 963 | 'languages' => ['DA', 'FO'], 964 | 'continents' => ['EU'], 965 | 'capital' => 'Tórshavn', 966 | 'flag' => '🇫🇴', 967 | 'phone_code' => '298', 968 | 'eu_member' => false, 969 | ], 970 | 'FJ' => [ 971 | 'alpha2' => 'FJ', 972 | 'alpha3' => 'FJI', 973 | 'numeric' => '242', 974 | 'tld' => '.fj', 975 | 'currencies' => ['FJD',], 976 | 'languages' => ['FJ', 'EN', 'HI'], 977 | 'continents' => ['OC'], 978 | 'capital' => 'Suva', 979 | 'flag' => '🇫🇯', 980 | 'phone_code' => '679', 981 | 'eu_member' => false, 982 | ], 983 | 'FI' => [ 984 | 'alpha2' => 'FI', 985 | 'alpha3' => 'FIN', 986 | 'numeric' => '246', 987 | 'tld' => '.fi', 988 | 'currencies' => ['EUR',], 989 | 'languages' => ['FI', 'SV'], 990 | 'continents' => ['EU'], 991 | 'capital' => 'Helsinki', 992 | 'flag' => '🇫🇮', 993 | 'phone_code' => '358', 994 | 'eu_member' => true, 995 | ], 996 | 'FR' => [ 997 | 'alpha2' => 'FR', 998 | 'alpha3' => 'FRA', 999 | 'numeric' => '250', 1000 | 'tld' => '.fr', 1001 | 'currencies' => ['EUR',], 1002 | 'languages' => ['FR', 'CO'], 1003 | 'continents' => ['EU'], 1004 | 'capital' => 'Paris', 1005 | 'flag' => '🇫🇷', 1006 | 'phone_code' => '33', 1007 | 'eu_member' => true, 1008 | ], 1009 | 'GF' => [ 1010 | 'alpha2' => 'GF', 1011 | 'alpha3' => 'GUF', 1012 | 'numeric' => '254', 1013 | 'tld' => '.gf', 1014 | 'currencies' => ['EUR',], 1015 | 'languages' => ['FR'], 1016 | 'continents' => ['SA'], 1017 | 'capital' => 'Cayenne', 1018 | 'flag' => '🇬🇫', 1019 | 'phone_code' => '594', 1020 | 'eu_member' => false, 1021 | ], 1022 | 'PF' => [ 1023 | 'alpha2' => 'PF', 1024 | 'alpha3' => 'PYF', 1025 | 'numeric' => '258', 1026 | 'tld' => '.pf', 1027 | 'currencies' => ['XPF',], 1028 | 'languages' => ['FR'], 1029 | 'continents' => ['OC'], 1030 | 'capital' => 'Papeetē', 1031 | 'flag' => '🇵🇫', 1032 | 'phone_code' => '689', 1033 | 'eu_member' => false, 1034 | ], 1035 | 'TF' => [ 1036 | 'alpha2' => 'TF', 1037 | 'alpha3' => 'ATF', 1038 | 'numeric' => '260', 1039 | 'tld' => '.tf', 1040 | 'currencies' => ['EUR',], 1041 | 'languages' => ['FR'], 1042 | 'continents' => ['AN'], 1043 | 'capital' => 'Port-aux-Français', 1044 | 'flag' => '🇹🇫', 1045 | 'phone_code' => null, 1046 | 'eu_member' => false, 1047 | ], 1048 | 'GA' => [ 1049 | 'alpha2' => 'GA', 1050 | 'alpha3' => 'GAB', 1051 | 'numeric' => '266', 1052 | 'tld' => '.ga', 1053 | 'currencies' => ['XAF',], 1054 | 'languages' => ['FR'], 1055 | 'continents' => ['AF'], 1056 | 'capital' => 'Libreville', 1057 | 'flag' => '🇬🇦', 1058 | 'phone_code' => '241', 1059 | 'eu_member' => false, 1060 | ], 1061 | 'GM' => [ 1062 | 'alpha2' => 'GM', 1063 | 'alpha3' => 'GMB', 1064 | 'numeric' => '270', 1065 | 'tld' => '.gm', 1066 | 'currencies' => ['GMD',], 1067 | 'languages' => ['EN'], 1068 | 'continents' => ['AF'], 1069 | 'capital' => 'Banjul', 1070 | 'flag' => '🇬🇲', 1071 | 'phone_code' => '220', 1072 | 'eu_member' => false, 1073 | 1074 | ], 1075 | 'GE' => [ 1076 | 'alpha2' => 'GE', 1077 | 'alpha3' => 'GEO', 1078 | 'numeric' => '268', 1079 | 'tld' => '.ge', 1080 | 'currencies' => ['GEL',], 1081 | 'languages' => ['KA'], 1082 | 'continents' => ['AS'], 1083 | 'capital' => 'Tbilisi', 1084 | 'flag' => '🇬🇪', 1085 | 'phone_code' => '995', 1086 | 'eu_member' => false, 1087 | ], 1088 | 'DE' => [ 1089 | 'alpha2' => 'DE', 1090 | 'alpha3' => 'DEU', 1091 | 'numeric' => '276', 1092 | 'tld' => '.de', 1093 | 'currencies' => ['EUR',], 1094 | 'languages' => ['DE'], 1095 | 'continents' => ['EU'], 1096 | 'capital' => 'Berlin', 1097 | 'flag' => '🇩🇪', 1098 | 'phone_code' => '49', 1099 | 'eu_member' => true, 1100 | ], 1101 | 'GH' => [ 1102 | 'alpha2' => 'GH', 1103 | 'alpha3' => 'GHA', 1104 | 'numeric' => '288', 1105 | 'tld' => '.gh', 1106 | 'currencies' => ['GHS',], 1107 | 'languages' => ['EN'], 1108 | 'continents' => ['AF'], 1109 | 'capital' => 'Accra', 1110 | 'flag' => '🇬🇭', 1111 | 'phone_code' => '233', 1112 | 'eu_member' => false, 1113 | ], 1114 | 'GI' => [ 1115 | 'alpha2' => 'GI', 1116 | 'alpha3' => 'GIB', 1117 | 'numeric' => '292', 1118 | 'tld' => '.gi', 1119 | 'currencies' => ['GIP', 'GBP'], 1120 | 'languages' => ['EN'], 1121 | 'continents' => ['EU'], 1122 | 'capital' => 'Gibraltar', 1123 | 'flag' => '🇬🇮', 1124 | 'phone_code' => '350', 1125 | 'eu_member' => false, 1126 | ], 1127 | 'GR' => [ 1128 | 'alpha2' => 'GR', 1129 | 'alpha3' => 'GRC', 1130 | 'numeric' => '300', 1131 | 'tld' => '.gr', 1132 | 'currencies' => ['EUR',], 1133 | 'languages' => ['EL'], 1134 | 'continents' => ['EU'], 1135 | 'capital' => 'Athens', 1136 | 'flag' => '🇬🇷', 1137 | 'phone_code' => '30', 1138 | 'eu_member' => true, 1139 | ], 1140 | 'GL' => [ 1141 | 'alpha2' => 'GL', 1142 | 'alpha3' => 'GRL', 1143 | 'numeric' => '304', 1144 | 'tld' => '.gl', 1145 | 'currencies' => ['DKK',], 1146 | 'languages' => ['DA', 'KL'], 1147 | 'continents' => ['NA'], 1148 | 'capital' => 'Nuuk', 1149 | 'flag' => '🇬🇱', 1150 | 'phone_code' => '299', 1151 | 'eu_member' => false, 1152 | ], 1153 | 'GD' => [ 1154 | 'alpha2' => 'GD', 1155 | 'alpha3' => 'GRD', 1156 | 'numeric' => '308', 1157 | 'tld' => '.gd', 1158 | 'currencies' => ['XCD',], 1159 | 'languages' => ['EN'], 1160 | 'continents' => ['NA'], 1161 | 'capital' => 'St. George\'s', 1162 | 'flag' => '🇬🇩', 1163 | 'phone_code' => '1473', 1164 | 'eu_member' => false, 1165 | ], 1166 | 'GP' => [ 1167 | 'alpha2' => 'GP', 1168 | 'alpha3' => 'GLP', 1169 | 'numeric' => '312', 1170 | 'tld' => '.gp', 1171 | 'currencies' => ['EUR',], 1172 | 'languages' => ['FR'], 1173 | 'continents' => ['NA'], 1174 | 'capital' => 'Basse-Terre', 1175 | 'flag' => '🇬🇵', 1176 | 'phone_code' => '590', 1177 | 'eu_member' => false, 1178 | ], 1179 | 'GU' => [ 1180 | 'alpha2' => 'GU', 1181 | 'alpha3' => 'GUM', 1182 | 'numeric' => '316', 1183 | 'tld' => '.gu', 1184 | 'currencies' => ['USD',], 1185 | 'languages' => ['EN', 'JA'], 1186 | 'continents' => ['OC'], 1187 | 'capital' => 'Hagåtña', 1188 | 'flag' => '🇬🇺', 1189 | 'phone_code' => '1671', 1190 | 'eu_member' => false, 1191 | ], 1192 | 'GT' => [ 1193 | 'alpha2' => 'GT', 1194 | 'alpha3' => 'GTM', 1195 | 'numeric' => '320', 1196 | 'tld' => '.gt', 1197 | 'currencies' => ['GTQ',], 1198 | 'languages' => ['ES'], 1199 | 'continents' => ['NA'], 1200 | 'capital' => 'Guatemala City', 1201 | 'flag' => '🇬🇹', 1202 | 'phone_code' => '502', 1203 | 'eu_member' => false, 1204 | ], 1205 | 'GG' => [ 1206 | 'alpha2' => 'GG', 1207 | 'alpha3' => 'GGY', 1208 | 'numeric' => '831', 1209 | 'tld' => '.gg', 1210 | 'currencies' => ['GBP',], 1211 | 'languages' => ['EN'], 1212 | 'continents' => ['EU'], 1213 | 'capital' => 'St. Peter Port', 1214 | 'flag' => '🇬🇬', 1215 | 'phone_code' => '44', 1216 | 'eu_member' => false, 1217 | ], 1218 | 'GN' => [ 1219 | 'alpha2' => 'GN', 1220 | 'alpha3' => 'GIN', 1221 | 'numeric' => '324', 1222 | 'tld' => '.gn', 1223 | 'currencies' => ['GNF',], 1224 | 'languages' => ['FR'], 1225 | 'continents' => ['AF'], 1226 | 'capital' => 'Conakry', 1227 | 'flag' => '🇬🇳', 1228 | 'phone_code' => '224', 1229 | 'eu_member' => false, 1230 | ], 1231 | 'GW' => [ 1232 | 'alpha2' => 'GW', 1233 | 'alpha3' => 'GNB', 1234 | 'numeric' => '624', 1235 | 'tld' => '.gw', 1236 | 'currencies' => ['XOF',], 1237 | 'languages' => ['PT'], 1238 | 'continents' => ['AF'], 1239 | 'capital' => 'Bissau', 1240 | 'flag' => '🇬🇼', 1241 | 'phone_code' => '245', 1242 | 'eu_member' => false, 1243 | ], 1244 | 'GY' => [ 1245 | 'alpha2' => 'GY', 1246 | 'alpha3' => 'GUY', 1247 | 'numeric' => '328', 1248 | 'tld' => '.gy', 1249 | 'currencies' => ['GYD',], 1250 | 'languages' => ['EN'], 1251 | 'continents' => ['SA'], 1252 | 'capital' => 'Georgetown', 1253 | 'flag' => '🇬🇾', 1254 | 'phone_code' => '592', 1255 | 'eu_member' => false, 1256 | ], 1257 | 'HT' => [ 1258 | 'alpha2' => 'HT', 1259 | 'alpha3' => 'HTI', 1260 | 'numeric' => '332', 1261 | 'tld' => '.ht', 1262 | 'currencies' => ['HTG',], 1263 | 'languages' => ['HT', 'FR'], 1264 | 'continents' => ['NA'], 1265 | 'capital' => 'Port-au-Prince', 1266 | 'flag' => '🇭🇹', 1267 | 'phone_code' => '509', 1268 | 'eu_member' => false, 1269 | ], 1270 | 'HM' => [ 1271 | 'alpha2' => 'HM', 1272 | 'alpha3' => 'HMD', 1273 | 'numeric' => '334', 1274 | 'tld' => '.hm', 1275 | 'currencies' => ['AUD',], 1276 | 'languages' => ['EN'], 1277 | 'continents' => ['AN'], 1278 | 'capital' => null, 1279 | 'flag' => '🇭🇲', 1280 | 'phone_code' => null, 1281 | 'eu_member' => false, 1282 | ], 1283 | 'VA' => [ 1284 | 'alpha2' => 'VA', 1285 | 'alpha3' => 'VAT', 1286 | 'numeric' => '336', 1287 | 'tld' => '.va', 1288 | 'currencies' => ['EUR',], 1289 | 'languages' => ['IT'], 1290 | 'continents' => ['EU'], 1291 | 'capital' => 'Vatican City', 1292 | 'flag' => '🇻🇦', 1293 | 'phone_code' => '3906698', 1294 | 'eu_member' => false, 1295 | ], 1296 | 'HN' => [ 1297 | 'alpha2' => 'HN', 1298 | 'alpha3' => 'HND', 1299 | 'numeric' => '340', 1300 | 'tld' => '.hn', 1301 | 'currencies' => ['HNL',], 1302 | 'languages' => ['ES', 'EN'], 1303 | 'continents' => ['NA'], 1304 | 'capital' => 'Tegucigalpa', 1305 | 'flag' => '🇭🇳', 1306 | 'phone_code' => '504', 1307 | 'eu_member' => false, 1308 | ], 1309 | 'HK' => [ 1310 | 'alpha2' => 'HK', 1311 | 'alpha3' => 'HKG', 1312 | 'numeric' => '344', 1313 | 'tld' => '.hk', 1314 | 'currencies' => ['HKD',], 1315 | 'languages' => ['EN', 'ZH'], 1316 | 'continents' => ['AS'], 1317 | 'capital' => 'City of Victoria', 1318 | 'flag' => '🇭🇰', 1319 | 'phone_code' => '852', 1320 | 'eu_member' => false, 1321 | ], 1322 | 'HU' => [ 1323 | 'alpha2' => 'HU', 1324 | 'alpha3' => 'HUN', 1325 | 'numeric' => '348', 1326 | 'tld' => '.hu', 1327 | 'currencies' => ['HUF',], 1328 | 'languages' => ['HU'], 1329 | 'continents' => ['EU'], 1330 | 'capital' => 'Budapest', 1331 | 'flag' => '🇭🇺', 1332 | 'phone_code' => '36', 1333 | 'eu_member' => true, 1334 | ], 1335 | 'IS' => [ 1336 | 'alpha2' => 'IS', 1337 | 'alpha3' => 'ISL', 1338 | 'numeric' => '352', 1339 | 'tld' => '.is', 1340 | 'currencies' => ['ISK',], 1341 | 'languages' => ['IS'], 1342 | 'continents' => ['EU'], 1343 | 'capital' => 'Reykjavik', 1344 | 'flag' => '🇮🇸', 1345 | 'phone_code' => '354', 1346 | 'eu_member' => false, 1347 | ], 1348 | 'IN' => [ 1349 | 'alpha2' => 'IN', 1350 | 'alpha3' => 'IND', 1351 | 'numeric' => '356', 1352 | 'tld' => '.in', 1353 | 'currencies' => ['INR',], 1354 | 'languages' => ['HI', 'EN'], 1355 | 'continents' => ['AS'], 1356 | 'capital' => 'New Delhi', 1357 | 'flag' => '🇮🇳', 1358 | 'phone_code' => '91', 1359 | 'eu_member' => false, 1360 | ], 1361 | 'ID' => [ 1362 | 'alpha2' => 'ID', 1363 | 'alpha3' => 'IDN', 1364 | 'numeric' => '360', 1365 | 'tld' => '.id', 1366 | 'currencies' => ['IDR',], 1367 | 'languages' => ['MY'], 1368 | 'continents' => ['AS'], 1369 | 'capital' => 'Naypyidaw', 1370 | 'flag' => '🇲🇲', 1371 | 'phone_code' => '95', 1372 | 'eu_member' => false, 1373 | ], 1374 | 'IR' => [ 1375 | 'alpha2' => 'IR', 1376 | 'alpha3' => 'IRN', 1377 | 'numeric' => '364', 1378 | 'tld' => '.ir', 1379 | 'currencies' => ['IRR',], 1380 | 'languages' => ['FA'], 1381 | 'continents' => ['AS'], 1382 | 'capital' => 'Tehran', 1383 | 'flag' => '🇮🇷', 1384 | 'phone_code' => '98', 1385 | 'eu_member' => false, 1386 | ], 1387 | 'IQ' => [ 1388 | 'alpha2' => 'IQ', 1389 | 'alpha3' => 'IRQ', 1390 | 'numeric' => '368', 1391 | 'tld' => '.iq', 1392 | 'currencies' => ['IQD',], 1393 | 'languages' => ['AR', 'KU'], 1394 | 'continents' => ['AS'], 1395 | 'capital' => 'Baghdad', 1396 | 'flag' => '🇮🇶', 1397 | 'phone_code' => '964', 1398 | 'eu_member' => false, 1399 | ], 1400 | 'IE' => [ 1401 | 'alpha2' => 'IE', 1402 | 'alpha3' => 'IRL', 1403 | 'numeric' => '372', 1404 | 'tld' => '.ie', 1405 | 'currencies' => ['EUR',], 1406 | 'languages' => ['GA', 'EN'], 1407 | 'continents' => ['EU'], 1408 | 'capital' => 'Dublin', 1409 | 'flag' => '🇮🇪', 1410 | 'phone_code' => '353', 1411 | 'eu_member' => true, 1412 | ], 1413 | 'IM' => [ 1414 | 'alpha2' => 'IM', 1415 | 'alpha3' => 'IMN', 1416 | 'numeric' => '833', 1417 | 'tld' => '.im', 1418 | 'currencies' => ['GBP',], 1419 | 'languages' => ['EN'], 1420 | 'continents' => ['EU'], 1421 | 'capital' => 'Douglas', 1422 | 'flag' => '🇮🇲', 1423 | 'phone_code' => '44', 1424 | 'eu_member' => false, 1425 | ], 1426 | 'IL' => [ 1427 | 'alpha2' => 'IL', 1428 | 'alpha3' => 'ISR', 1429 | 'numeric' => '376', 1430 | 'tld' => '.il', 1431 | 'currencies' => ['ILS',], 1432 | 'languages' => ['HE'], 1433 | 'continents' => ['AS'], 1434 | 'capital' => 'Ramallah', 1435 | 'flag' => '🇵🇸', 1436 | 'phone_code' => '970', 1437 | 'eu_member' => false, 1438 | ], 1439 | 'IT' => [ 1440 | 'alpha2' => 'IT', 1441 | 'alpha3' => 'ITA', 1442 | 'numeric' => '380', 1443 | 'tld' => '.it', 1444 | 'currencies' => ['EUR',], 1445 | 'languages' => ['IT'], 1446 | 'continents' => ['EU'], 1447 | 'capital' => 'Rome', 1448 | 'flag' => '🇮🇹', 1449 | 'phone_code' => '39', 1450 | 'eu_member' => true, 1451 | ], 1452 | 'JM' => [ 1453 | 'alpha2' => 'JM', 1454 | 'alpha3' => 'JAM', 1455 | 'numeric' => '388', 1456 | 'tld' => '.jm', 1457 | 'currencies' => ['JMD',], 1458 | 'languages' => ['EN'], 1459 | 'continents' => ['NA'], 1460 | 'capital' => 'Kingston', 1461 | 'flag' => '🇯🇲', 1462 | 'phone_code' => '1876', 1463 | 'eu_member' => false, 1464 | ], 1465 | 'JP' => [ 1466 | 'alpha2' => 'JP', 1467 | 'alpha3' => 'JPN', 1468 | 'numeric' => '392', 1469 | 'tld' => '.jp', 1470 | 'currencies' => ['JPY',], 1471 | 'languages' => ['JA'], 1472 | 'continents' => ['AS'], 1473 | 'capital' => 'Tokyo', 1474 | 'flag' => '🇯🇵', 1475 | 'phone_code' => '81', 1476 | 'eu_member' => false, 1477 | ], 1478 | 'JE' => [ 1479 | 'alpha2' => 'JE', 1480 | 'alpha3' => 'JEY', 1481 | 'numeric' => '832', 1482 | 'tld' => '.je', 1483 | 'currencies' => ['GBP',], 1484 | 'languages' => ['EN'], 1485 | 'continents' => ['EU'], 1486 | 'capital' => 'Saint Helier', 1487 | 'flag' => '🇯🇪', 1488 | 'phone_code' => '44', 1489 | 'eu_member' => false, 1490 | ], 1491 | 'JO' => [ 1492 | 'alpha2' => 'JO', 1493 | 'alpha3' => 'JOR', 1494 | 'numeric' => '400', 1495 | 'tld' => '.jo', 1496 | 'currencies' => ['JOD',], 1497 | 'languages' => ['AR'], 1498 | 'continents' => ['AS'], 1499 | 'capital' => 'Amman', 1500 | 'flag' => '🇯🇴', 1501 | 'phone_code' => '962', 1502 | 'eu_member' => false, 1503 | ], 1504 | 'KZ' => [ 1505 | 'alpha2' => 'KZ', 1506 | 'alpha3' => 'KAZ', 1507 | 'numeric' => '398', 1508 | 'tld' => '.kz', 1509 | 'currencies' => ['KZT',], 1510 | 'languages' => ['KK', 'RU'], 1511 | 'continents' => ['AS'], 1512 | 'capital' => 'Astana', 1513 | 'flag' => '🇰🇿', 1514 | 'phone_code' => '76', 1515 | 'eu_member' => false, 1516 | ], 1517 | 'KE' => [ 1518 | 'alpha2' => 'KE', 1519 | 'alpha3' => 'KEN', 1520 | 'numeric' => '404', 1521 | 'tld' => '.ke', 1522 | 'currencies' => ['KES',], 1523 | 'languages' => ['EN'], 1524 | 'continents' => ['AF'], 1525 | 'capital' => 'Nairobi', 1526 | 'flag' => '🇰🇪', 1527 | 'phone_code' => '254', 1528 | 'eu_member' => false, 1529 | ], 1530 | 'KI' => [ 1531 | 'alpha2' => 'KI', 1532 | 'alpha3' => 'KIR', 1533 | 'numeric' => '296', 1534 | 'tld' => '.ki', 1535 | 'languages' => ['EN'], 1536 | 'currencies' => ['AUD',], 1537 | 'continents' => ['OC'], 1538 | 'capital' => 'South Tarawa', 1539 | 'flag' => '🇰🇮', 1540 | 'phone_code' => '686', 1541 | 'eu_member' => false, 1542 | ], 1543 | 'KP' => [ 1544 | 'alpha2' => 'KP', 1545 | 'alpha3' => 'PRK', 1546 | 'numeric' => '408', 1547 | 'tld' => '.kp', 1548 | 'currencies' => ['KPW',], 1549 | 'languages' => ['KO'], 1550 | 'continents' => ['AS'], 1551 | 'capital' => 'Pyongyang', 1552 | 'flag' => '🇰🇵', 1553 | 'phone_code' => '850', 1554 | 'eu_member' => false, 1555 | ], 1556 | 'KR' => [ 1557 | 'alpha2' => 'KR', 1558 | 'alpha3' => 'KOR', 1559 | 'numeric' => '410', 1560 | 'tld' => '.kr', 1561 | 'currencies' => ['KRW',], 1562 | 'languages' => ['KO'], 1563 | 'continents' => ['AS'], 1564 | 'capital' => 'Seoul', 1565 | 'flag' => '🇰🇷', 1566 | 'phone_code' => '82', 1567 | 'eu_member' => false, 1568 | ], 1569 | 'KW' => [ 1570 | 'alpha2' => 'KW', 1571 | 'alpha3' => 'KWT', 1572 | 'numeric' => '414', 1573 | 'tld' => '.kw', 1574 | 'currencies' => ['KWD',], 1575 | 'languages' => ['AR'], 1576 | 'continents' => ['AS'], 1577 | 'capital' => 'Kuwait City', 1578 | 'flag' => '🇰🇼', 1579 | 'phone_code' => '965', 1580 | 'eu_member' => false, 1581 | ], 1582 | 'KG' => [ 1583 | 'alpha2' => 'KG', 1584 | 'alpha3' => 'KGZ', 1585 | 'numeric' => '417', 1586 | 'tld' => '.kg', 1587 | 'currencies' => ['KGS',], 1588 | 'languages' => ['KY', 'RU'], 1589 | 'continents' => ['AS'], 1590 | 'capital' => 'Bishkek', 1591 | 'flag' => '🇰🇬', 1592 | 'phone_code' => '996', 1593 | 'eu_member' => false, 1594 | ], 1595 | 'LA' => [ 1596 | 'alpha2' => 'LA', 1597 | 'alpha3' => 'LAO', 1598 | 'numeric' => '418', 1599 | 'tld' => '.la', 1600 | 'currencies' => ['LAK',], 1601 | 'languages' => ['LO'], 1602 | 'continents' => ['AS'], 1603 | 'capital' => 'Vientiane', 1604 | 'flag' => '🇱🇦', 1605 | 'phone_code' => '856', 1606 | 'eu_member' => false, 1607 | ], 1608 | 'LV' => [ 1609 | 'alpha2' => 'LV', 1610 | 'alpha3' => 'LVA', 1611 | 'numeric' => '428', 1612 | 'tld' => '.lv', 1613 | 'currencies' => ['EUR',], 1614 | 'languages' => ['LV'], 1615 | 'continents' => ['EU'], 1616 | 'capital' => 'Riga', 1617 | 'flag' => '🇱🇻', 1618 | 'phone_code' => '371', 1619 | 'eu_member' => true, 1620 | ], 1621 | 'LB' => [ 1622 | 'alpha2' => 'LB', 1623 | 'alpha3' => 'LBN', 1624 | 'numeric' => '422', 1625 | 'tld' => '.lb', 1626 | 'currencies' => ['LBP',], 1627 | 'languages' => ['AR'], 1628 | 'continents' => ['AS'], 1629 | 'capital' => 'Beirut', 1630 | 'flag' => '🇱🇧', 1631 | 'phone_code' => '961', 1632 | 'eu_member' => false, 1633 | ], 1634 | 'LS' => [ 1635 | 'alpha2' => 'LS', 1636 | 'alpha3' => 'LSO', 1637 | 'numeric' => '426', 1638 | 'tld' => '.ls', 1639 | 'currencies' => ['LSL', 'ZAR',], 1640 | 'languages' => ['ST', 'EN'], 1641 | 'continents' => ['AF'], 1642 | 'capital' => 'Maseru', 1643 | 'flag' => '🇱🇸', 1644 | 'phone_code' => '266', 1645 | 'eu_member' => false, 1646 | ], 1647 | 'LR' => [ 1648 | 'alpha2' => 'LR', 1649 | 'alpha3' => 'LBR', 1650 | 'numeric' => '430', 1651 | 'tld' => '.lr', 1652 | 'currencies' => ['LRD',], 1653 | 'languages' => ['EN'], 1654 | 'continents' => ['AF'], 1655 | 'capital' => 'Monrovia', 1656 | 'flag' => '🇱🇷', 1657 | 'phone_code' => '231', 1658 | 'eu_member' => false, 1659 | ], 1660 | 'LY' => [ 1661 | 'alpha2' => 'LY', 1662 | 'alpha3' => 'LBY', 1663 | 'numeric' => '434', 1664 | 'tld' => '.ly', 1665 | 'currencies' => ['LYD',], 1666 | 'languages' => ['AR'], 1667 | 'continents' => ['AS'], 1668 | 'capital' => 'Tripoli', 1669 | 'flag' => '🇱🇾', 1670 | 'phone_code' => '218', 1671 | 'eu_member' => false, 1672 | ], 1673 | 'LI' => [ 1674 | 'alpha2' => 'LI', 1675 | 'alpha3' => 'LIE', 1676 | 'numeric' => '438', 1677 | 'tld' => '.li', 1678 | 'currencies' => ['CHF',], 1679 | 'languages' => ['DE'], 1680 | 'continents' => ['EU'], 1681 | 'capital' => 'Vaduz', 1682 | 'flag' => '🇱🇮', 1683 | 'phone_code' => '423', 1684 | 'eu_member' => false, 1685 | ], 1686 | 'LT' => [ 1687 | 'alpha2' => 'LT', 1688 | 'alpha3' => 'LTU', 1689 | 'numeric' => '440', 1690 | 'tld' => '.lt', 1691 | 'currencies' => ['EUR',], 1692 | 'languages' => ['LT'], 1693 | 'continents' => ['EU'], 1694 | 'capital' => 'Vilnius', 1695 | 'flag' => '🇱🇹', 1696 | 'phone_code' => '370', 1697 | 'eu_member' => true, 1698 | ], 1699 | 'LU' => [ 1700 | 'alpha2' => 'LU', 1701 | 'alpha3' => 'LUX', 1702 | 'numeric' => '442', 1703 | 'tld' => '.lu', 1704 | 'currencies' => ['EUR',], 1705 | 'languages' => ['FR', 'DE', 'LB'], 1706 | 'continents' => ['EU'], 1707 | 'capital' => 'Luxembourg', 1708 | 'flag' => '🇱🇺', 1709 | 'phone_code' => '352', 1710 | 'eu_member' => true, 1711 | ], 1712 | 'MO' => [ 1713 | 'alpha2' => 'MO', 1714 | 'alpha3' => 'MAC', 1715 | 'numeric' => '446', 1716 | 'tld' => '.mo', 1717 | 'currencies' => ['MOP',], 1718 | 'languages' => ['PT', 'ZH'], 1719 | 'continents' => ['AS'], 1720 | 'capital' => null, 1721 | 'flag' => '🇲🇴', 1722 | 'phone_code' => '853', 1723 | 'eu_member' => false, 1724 | ], 1725 | 'MK' => [ 1726 | 'alpha2' => 'MK', 1727 | 'alpha3' => 'MKD', 1728 | 'numeric' => '807', 1729 | 'tld' => '.mk', 1730 | 'currencies' => ['MKD',], 1731 | 'languages' => ['MK', 'SQ'], 1732 | 'continents' => ['EU'], 1733 | 'capital' => 'Skopje', 1734 | 'flag' => '🇲🇰', 1735 | 'phone_code' => '389', 1736 | 'eu_member' => false, 1737 | ], 1738 | 'MG' => [ 1739 | 'alpha2' => 'MG', 1740 | 'alpha3' => 'MDG', 1741 | 'numeric' => '450', 1742 | 'tld' => '.mg', 1743 | 'currencies' => ['MGA',], 1744 | 'languages' => ['FR', 'MG'], 1745 | 'continents' => ['AF'], 1746 | 'capital' => 'Antananarivo', 1747 | 'flag' => '🇲🇬', 1748 | 'phone_code' => '261', 1749 | 'eu_member' => false, 1750 | ], 1751 | 'MW' => [ 1752 | 'alpha2' => 'MW', 1753 | 'alpha3' => 'MWI', 1754 | 'numeric' => '454', 1755 | 'tld' => '.mw', 1756 | 'currencies' => ['MWK',], 1757 | 'languages' => ['EN'], 1758 | 'continents' => ['AF'], 1759 | 'capital' => 'Lilongwe', 1760 | 'flag' => '🇲🇼', 1761 | 'phone_code' => '265', 1762 | 'eu_member' => false, 1763 | ], 1764 | 'MY' => [ 1765 | 'alpha2' => 'MY', 1766 | 'alpha3' => 'MYS', 1767 | 'numeric' => '458', 1768 | 'tld' => '.my', 1769 | 'currencies' => ['MYR',], 1770 | 'languages' => ['MS', 'EN'], 1771 | 'continents' => ['AS'], 1772 | 'capital' => 'Kuala Lumpur', 1773 | 'flag' => '🇲🇾', 1774 | 'phone_code' => '60', 1775 | 'eu_member' => false, 1776 | ], 1777 | 'MV' => [ 1778 | 'alpha2' => 'MV', 1779 | 'alpha3' => 'MDV', 1780 | 'numeric' => '462', 1781 | 'tld' => '.mv', 1782 | 'currencies' => ['MVR',], 1783 | 'languages' => ['DV', 'EN'], 1784 | 'continents' => ['AS'], 1785 | 'capital' => 'Malé', 1786 | 'flag' => '🇲🇻', 1787 | 'phone_code' => '960', 1788 | 'eu_member' => false, 1789 | ], 1790 | 'ML' => [ 1791 | 'alpha2' => 'ML', 1792 | 'alpha3' => 'MLI', 1793 | 'numeric' => '466', 1794 | 'tld' => '.ml', 1795 | 'currencies' => ['XOF',], 1796 | 'languages' => ['FR'], 1797 | 'continents' => ['AF'], 1798 | 'capital' => 'Bamako', 1799 | 'flag' => '🇲🇱', 1800 | 'phone_code' => '223', 1801 | 'eu_member' => false, 1802 | ], 1803 | 'MT' => [ 1804 | 'alpha2' => 'MT', 1805 | 'alpha3' => 'MLT', 1806 | 'numeric' => '470', 1807 | 'tld' => '.mt', 1808 | 'currencies' => ['EUR',], 1809 | 'languages' => ['MT', 'EN'], 1810 | 'continents' => ['EU'], 1811 | 'capital' => 'Valletta', 1812 | 'flag' => '🇲🇹', 1813 | 'phone_code' => '356', 1814 | 'eu_member' => true, 1815 | ], 1816 | 'MH' => [ 1817 | 'alpha2' => 'MH', 1818 | 'alpha3' => 'MHL', 1819 | 'numeric' => '584', 1820 | 'tld' => '.mh', 1821 | 'currencies' => ['USD',], 1822 | 'languages' => ['EN'], 1823 | 'continents' => ['OC'], 1824 | 'capital' => 'Majuro', 1825 | 'flag' => '🇲🇭', 1826 | 'phone_code' => '692', 1827 | 'eu_member' => false, 1828 | ], 1829 | 'MQ' => [ 1830 | 'alpha2' => 'MQ', 1831 | 'alpha3' => 'MTQ', 1832 | 'numeric' => '474', 1833 | 'tld' => '.mq', 1834 | 'currencies' => ['EUR',], 1835 | 'languages' => ['FR'], 1836 | 'continents' => ['NA'], 1837 | 'capital' => 'Fort-de-France', 1838 | 'flag' => '🇲🇶', 1839 | 'phone_code' => '596', 1840 | 'eu_member' => false, 1841 | ], 1842 | 'MR' => [ 1843 | 'alpha2' => 'MR', 1844 | 'alpha3' => 'MRT', 1845 | 'numeric' => '478', 1846 | 'tld' => '.mr', 1847 | 'currencies' => ['MRU',], 1848 | 'languages' => ['AR'], 1849 | 'continents' => ['AF'], 1850 | 'capital' => 'Nouakchott', 1851 | 'flag' => '🇲🇷', 1852 | 'phone_code' => '222', 1853 | 'eu_member' => false, 1854 | ], 1855 | 'MU' => [ 1856 | 'alpha2' => 'MU', 1857 | 'alpha3' => 'MUS', 1858 | 'numeric' => '480', 1859 | 'tld' => '.mu', 1860 | 'currencies' => ['MUR',], 1861 | 'languages' => ['EN'], 1862 | 'continents' => ['AF'], 1863 | 'capital' => 'Port Louis', 1864 | 'flag' => '🇲🇺', 1865 | 'phone_code' => '230', 1866 | 'eu_member' => false, 1867 | ], 1868 | 'YT' => [ 1869 | 'alpha2' => 'YT', 1870 | 'alpha3' => 'MYT', 1871 | 'numeric' => '175', 1872 | 'tld' => '.yt', 1873 | 'currencies' => ['EUR',], 1874 | 'languages' => ['FR'], 1875 | 'continents' => ['AF'], 1876 | 'capital' => 'Mamoudzou', 1877 | 'flag' => '🇾🇹', 1878 | 'phone_code' => '262', 1879 | 'eu_member' => false, 1880 | ], 1881 | 'MX' => [ 1882 | 'alpha2' => 'MX', 1883 | 'alpha3' => 'MEX', 1884 | 'numeric' => '484', 1885 | 'tld' => '.mx', 1886 | 'currencies' => ['MXN',], 1887 | 'languages' => ['ES'], 1888 | 'continents' => ['NA'], 1889 | 'capital' => 'Mexico City', 1890 | 'flag' => '🇲🇽', 1891 | 'phone_code' => '52', 1892 | 'eu_member' => false, 1893 | ], 1894 | 'FM' => [ 1895 | 'alpha2' => 'FM', 1896 | 'alpha3' => 'FSM', 1897 | 'numeric' => '583', 1898 | 'tld' => '.fm', 1899 | 'currencies' => ['USD',], 1900 | 'languages' => ['EN'], 1901 | 'continents' => ['OC'], 1902 | 'capital' => 'Palikir', 1903 | 'flag' => '🇫🇲', 1904 | 'phone_code' => '691', 1905 | 'eu_member' => false, 1906 | ], 1907 | 'MD' => [ 1908 | 'alpha2' => 'MD', 1909 | 'alpha3' => 'MDA', 1910 | 'numeric' => '498', 1911 | 'tld' => '.md', 1912 | 'currencies' => ['MDL',], 1913 | 'languages' => ['RO', 'RU', 'UK'], 1914 | 'continents' => ['EU'], 1915 | 'capital' => 'Chișinău', 1916 | 'flag' => '🇲🇩', 1917 | 'phone_code' => '373', 1918 | 'eu_member' => false, 1919 | ], 1920 | 'MC' => [ 1921 | 'alpha2' => 'MC', 1922 | 'alpha3' => 'MCO', 1923 | 'numeric' => '492', 1924 | 'tld' => '.mc', 1925 | 'currencies' => ['EUR',], 1926 | 'languages' => ['FR'], 1927 | 'continents' => ['EU'], 1928 | 'capital' => 'Monaco', 1929 | 'flag' => '🇲🇨', 1930 | 'phone_code' => '377', 1931 | 'eu_member' => false, 1932 | ], 1933 | 'MN' => [ 1934 | 'alpha2' => 'MN', 1935 | 'alpha3' => 'MNG', 1936 | 'numeric' => '496', 1937 | 'tld' => '.mn', 1938 | 'currencies' => ['MNT',], 1939 | 'languages' => ['MN'], 1940 | 'continents' => ['AS'], 1941 | 'capital' => 'Ulan Bator', 1942 | 'flag' => '🇲🇳', 1943 | 'phone_code' => '976', 1944 | 'eu_member' => false, 1945 | ], 1946 | 'ME' => [ 1947 | 'alpha2' => 'ME', 1948 | 'alpha3' => 'MNE', 1949 | 'numeric' => '499', 1950 | 'tld' => '.me', 1951 | 'currencies' => ['EUR',], 1952 | 'languages' => ['SQ', 'BS', 'HR', 'SR'], 1953 | 'continents' => ['EU'], 1954 | 'capital' => 'Podgorica', 1955 | 'flag' => '🇲🇪', 1956 | 'phone_code' => '382', 1957 | 'eu_member' => false, 1958 | ], 1959 | 'MS' => [ 1960 | 'alpha2' => 'MS', 1961 | 'alpha3' => 'MSR', 1962 | 'numeric' => '500', 1963 | 'tld' => '.ms', 1964 | 'currencies' => ['XCD',], 1965 | 'languages' => ['EN'], 1966 | 'continents' => ['NA'], 1967 | 'capital' => 'Plymouth', 1968 | 'flag' => '🇲🇸', 1969 | 'phone_code' => '1664', 1970 | 'eu_member' => false, 1971 | ], 1972 | 'MA' => [ 1973 | 'alpha2' => 'MA', 1974 | 'alpha3' => 'MAR', 1975 | 'numeric' => '504', 1976 | 'tld' => '.ma', 1977 | 'currencies' => ['MAD',], 1978 | 'languages' => ['AR'], 1979 | 'continents' => ['AF'], 1980 | 'capital' => 'Rabat', 1981 | 'flag' => '🇲🇦', 1982 | 'phone_code' => '212', 1983 | 'eu_member' => false, 1984 | ], 1985 | 'MZ' => [ 1986 | 'alpha2' => 'MZ', 1987 | 'alpha3' => 'MOZ', 1988 | 'numeric' => '508', 1989 | 'tld' => '.mz', 1990 | 'currencies' => ['MZN',], 1991 | 'languages' => ['PT'], 1992 | 'continents' => ['AF'], 1993 | 'capital' => 'Maputo', 1994 | 'flag' => '🇲🇿', 1995 | 'phone_code' => '258', 1996 | 'eu_member' => false, 1997 | ], 1998 | 'MM' => [ 1999 | 'alpha2' => 'MM', 2000 | 'alpha3' => 'MMR', 2001 | 'numeric' => '104', 2002 | 'tld' => '.mm', 2003 | 'currencies' => ['MMK',], 2004 | 'languages' => ['MY'], 2005 | 'continents' => ['AS'], 2006 | 'capital' => 'Naypyidaw', 2007 | 'flag' => '🇲🇲', 2008 | 'phone_code' => '95', 2009 | 'eu_member' => false, 2010 | ], 2011 | 'NA' => [ 2012 | 'alpha2' => 'NA', 2013 | 'alpha3' => 'NAM', 2014 | 'numeric' => '516', 2015 | 'tld' => '.na', 2016 | 'currencies' => ['NAD', 'ZAR',], 2017 | 'languages' => ['EN'], 2018 | 'continents' => ['AF'], 2019 | 'capital' => 'Windhoek', 2020 | 'flag' => '🇳🇦', 2021 | 'phone_code' => '264', 2022 | 'eu_member' => false, 2023 | ], 2024 | 'NR' => [ 2025 | 'alpha2' => 'NR', 2026 | 'alpha3' => 'NRU', 2027 | 'numeric' => '520', 2028 | 'tld' => '.nr', 2029 | 'currencies' => ['AUD',], 2030 | 'languages' => ['EN', 'NA'], 2031 | 'continents' => ['OC'], 2032 | 'capital' => 'Yaren', 2033 | 'flag' => '🇳🇷', 2034 | 'phone_code' => '674', 2035 | 'eu_member' => false, 2036 | ], 2037 | 'NP' => [ 2038 | 'alpha2' => 'NP', 2039 | 'alpha3' => 'NPL', 2040 | 'numeric' => '524', 2041 | 'tld' => '.np', 2042 | 'currencies' => ['NPR',], 2043 | 'languages' => ['NE'], 2044 | 'continents' => ['AS'], 2045 | 'capital' => 'Kathmandu', 2046 | 'flag' => '🇳🇵', 2047 | 'phone_code' => '977', 2048 | 'eu_member' => false, 2049 | ], 2050 | 'NL' => [ 2051 | 'alpha2' => 'NL', 2052 | 'alpha3' => 'NLD', 2053 | 'numeric' => '528', 2054 | 'tld' => '.nl', 2055 | 'currencies' => ['EUR',], 2056 | 'languages' => ['NL'], 2057 | 'continents' => ['EU'], 2058 | 'capital' => 'Amsterdam', 2059 | 'flag' => '🇳🇱', 2060 | 'phone_code' => '31', 2061 | 'eu_member' => true, 2062 | ], 2063 | 'NC' => [ 2064 | 'alpha2' => 'NC', 2065 | 'alpha3' => 'NCL', 2066 | 'numeric' => '540', 2067 | 'tld' => '.nc', 2068 | 'currencies' => ['XPF',], 2069 | 'languages' => ['FR'], 2070 | 'continents' => ['OC'], 2071 | 'capital' => 'Nouméa', 2072 | 'flag' => '🇳🇨', 2073 | 'phone_code' => '687', 2074 | 'eu_member' => false, 2075 | ], 2076 | 'NZ' => [ 2077 | 'alpha2' => 'NZ', 2078 | 'alpha3' => 'NZL', 2079 | 'numeric' => '554', 2080 | 'tld' => '.nz', 2081 | 'currencies' => ['NZD',], 2082 | 'languages' => ['EN', 'MI'], 2083 | 'continents' => ['OC'], 2084 | 'capital' => 'Wellington', 2085 | 'flag' => '🇳🇿', 2086 | 'phone_code' => '64', 2087 | 'eu_member' => false, 2088 | ], 2089 | 'NI' => [ 2090 | 'alpha2' => 'NI', 2091 | 'alpha3' => 'NIC', 2092 | 'numeric' => '558', 2093 | 'tld' => '.ni', 2094 | 'currencies' => ['NIO',], 2095 | 'languages' => ['ES'], 2096 | 'continents' => ['NA'], 2097 | 'capital' => 'Managua', 2098 | 'flag' => '🇳🇮', 2099 | 'phone_code' => '505', 2100 | 'eu_member' => false, 2101 | ], 2102 | 'NE' => [ 2103 | 'alpha2' => 'NE', 2104 | 'alpha3' => 'NER', 2105 | 'numeric' => '562', 2106 | 'tld' => '.ne', 2107 | 'currencies' => ['XOF',], 2108 | 'languages' => ['FR'], 2109 | 'continents' => ['AF'], 2110 | 'capital' => 'Niamey', 2111 | 'flag' => '🇳🇪', 2112 | 'phone_code' => '227', 2113 | 'eu_member' => false, 2114 | ], 2115 | 'NG' => [ 2116 | 'alpha2' => 'NG', 2117 | 'alpha3' => 'NGA', 2118 | 'numeric' => '566', 2119 | 'tld' => '.ng', 2120 | 'currencies' => ['NGN',], 2121 | 'languages' => ['FR', 'MG'], 2122 | 'continents' => ['AF'], 2123 | 'capital' => 'Abuja', 2124 | 'flag' => '🇳🇬', 2125 | 'phone_code' => '234', 2126 | 'eu_member' => false, 2127 | ], 2128 | 'NU' => [ 2129 | 'alpha2' => 'NU', 2130 | 'alpha3' => 'NIU', 2131 | 'numeric' => '570', 2132 | 'tld' => '.nu', 2133 | 'currencies' => ['NZD',], 2134 | 'languages' => ['EN'], 2135 | 'continents' => ['OC'], 2136 | 'capital' => 'Alofi', 2137 | 'flag' => '🇳🇺', 2138 | 'phone_code' => '683', 2139 | 'eu_member' => false, 2140 | ], 2141 | 'NF' => [ 2142 | 'alpha2' => 'NF', 2143 | 'alpha3' => 'NFK', 2144 | 'numeric' => '574', 2145 | 'tld' => '.nf', 2146 | 'currencies' => ['AUD',], 2147 | 'languages' => ['EN'], 2148 | 'continents' => ['OC'], 2149 | 'capital' => 'Kingston', 2150 | 'flag' => '🇳🇫', 2151 | 'phone_code' => '672', 2152 | 'eu_member' => false, 2153 | ], 2154 | 'MP' => [ 2155 | 'alpha2' => 'MP', 2156 | 'alpha3' => 'MNP', 2157 | 'numeric' => '580', 2158 | 'tld' => '.mp', 2159 | 'currencies' => ['USD',], 2160 | 'languages' => ['EN', 'CH'], 2161 | 'continents' => ['OC'], 2162 | 'capital' => 'Saipan', 2163 | 'flag' => '🇲🇵', 2164 | 'phone_code' => '1670', 2165 | 'eu_member' => false, 2166 | ], 2167 | 'NO' => [ 2168 | 'alpha2' => 'NO', 2169 | 'alpha3' => 'NOR', 2170 | 'numeric' => '578', 2171 | 'tld' => '.no', 2172 | 'currencies' => ['NOK',], 2173 | 'languages' => ['NO', 'SE'], 2174 | 'continents' => ['EU'], 2175 | 'capital' => 'Oslo', 2176 | 'flag' => '🇳🇴', 2177 | 'phone_code' => '47', 2178 | 'eu_member' => false, 2179 | ], 2180 | 'OM' => [ 2181 | 'alpha2' => 'OM', 2182 | 'alpha3' => 'OMN', 2183 | 'numeric' => '512', 2184 | 'tld' => '.om', 2185 | 'currencies' => ['OMR',], 2186 | 'languages' => ['AR'], 2187 | 'continents' => ['AS'], 2188 | 'capital' => 'Muscat', 2189 | 'flag' => '🇴🇲', 2190 | 'phone_code' => '968', 2191 | 'eu_member' => false, 2192 | ], 2193 | 'PK' => [ 2194 | 'alpha2' => 'PK', 2195 | 'alpha3' => 'PAK', 2196 | 'numeric' => '586', 2197 | 'tld' => '.pk', 2198 | 'currencies' => ['PKR',], 2199 | 'languages' => ['UR', 'EN'], 2200 | 'continents' => ['AS'], 2201 | 'capital' => 'Islamabad', 2202 | 'flag' => '🇵🇰', 2203 | 'phone_code' => '92', 2204 | 'eu_member' => false, 2205 | ], 2206 | 'PW' => [ 2207 | 'alpha2' => 'PW', 2208 | 'alpha3' => 'PLW', 2209 | 'numeric' => '585', 2210 | 'tld' => '.pw', 2211 | 'currencies' => ['USD',], 2212 | 'languages' => ['EN'], 2213 | 'continents' => ['OC'], 2214 | 'capital' => 'Ngerulmud', 2215 | 'flag' => '🇵🇼', 2216 | 'phone_code' => '680', 2217 | 'eu_member' => false, 2218 | ], 2219 | 'PS' => [ 2220 | 'alpha2' => 'PS', 2221 | 'alpha3' => 'PSE', 2222 | 'numeric' => '275', 2223 | 'tld' => '.ps', 2224 | 'currencies' => ['ILS',], 2225 | 'languages' => ['AR'], 2226 | 'continents' => ['AS'], 2227 | 'capital' => 'Ramallah', 2228 | 'flag' => '🇵🇸', 2229 | 'phone_code' => '970', 2230 | 'eu_member' => false, 2231 | ], 2232 | 'PA' => [ 2233 | 'alpha2' => 'PA', 2234 | 'alpha3' => 'PAN', 2235 | 'numeric' => '591', 2236 | 'tld' => '.pa', 2237 | 'currencies' => ['PAB',], 2238 | 'languages' => ['ES'], 2239 | 'continents' => ['NA'], 2240 | 'capital' => 'Panama City', 2241 | 'flag' => '🇵🇦', 2242 | 'phone_code' => '507', 2243 | 'eu_member' => false, 2244 | ], 2245 | 'PG' => [ 2246 | 'alpha2' => 'PG', 2247 | 'alpha3' => 'PNG', 2248 | 'numeric' => '598', 2249 | 'tld' => '.pg', 2250 | 'currencies' => ['PGK',], 2251 | 'languages' => ['EN', 'HO'], 2252 | 'continents' => ['OC'], 2253 | 'capital' => 'Port Moresby', 2254 | 'flag' => '🇵🇬', 2255 | 'phone_code' => '675', 2256 | 'eu_member' => false, 2257 | ], 2258 | 'PY' => [ 2259 | 'alpha2' => 'PY', 2260 | 'alpha3' => 'PRY', 2261 | 'numeric' => '600', 2262 | 'tld' => '.py', 2263 | 'currencies' => ['PYG',], 2264 | 'languages' => ['ES', 'GN'], 2265 | 'continents' => ['SA'], 2266 | 'capital' => 'Asunción', 2267 | 'flag' => '🇵🇾', 2268 | 'phone_code' => '595', 2269 | 'eu_member' => false, 2270 | ], 2271 | 'PE' => [ 2272 | 'alpha2' => 'PE', 2273 | 'alpha3' => 'PER', 2274 | 'numeric' => '604', 2275 | 'tld' => '.pe', 2276 | 'currencies' => ['PEN',], 2277 | 'languages' => ['ES', 'AY', 'QU'], 2278 | 'continents' => ['SA'], 2279 | 'capital' => 'Lima', 2280 | 'flag' => '🇵🇪', 2281 | 'phone_code' => '51', 2282 | 'eu_member' => false, 2283 | ], 2284 | 'PH' => [ 2285 | 'alpha2' => 'PH', 2286 | 'alpha3' => 'PHL', 2287 | 'numeric' => '608', 2288 | 'tld' => '.ph', 2289 | 'currencies' => ['PHP',], 2290 | 'languages' => ['EN', 'FIL'], 2291 | 'continents' => ['AS'], 2292 | 'capital' => 'Manila', 2293 | 'flag' => '🇵🇭', 2294 | 'phone_code' => '63', 2295 | 'eu_member' => false, 2296 | ], 2297 | 'PN' => [ 2298 | 'alpha2' => 'PN', 2299 | 'alpha3' => 'PCN', 2300 | 'numeric' => '612', 2301 | 'tld' => '.pn', 2302 | 'currencies' => ['NZD',], 2303 | 'languages' => ['EN', 'PIH'], 2304 | 'continents' => ['OC'], 2305 | 'capital' => 'Adamstown', 2306 | 'flag' => '🇵🇳', 2307 | 'phone_code' => '64', 2308 | 'eu_member' => false, 2309 | ], 2310 | 'PL' => [ 2311 | 'alpha2' => 'PL', 2312 | 'alpha3' => 'POL', 2313 | 'numeric' => '616', 2314 | 'tld' => '.pl', 2315 | 'currencies' => ['PLN',], 2316 | 'languages' => ['PL'], 2317 | 'continents' => ['EU'], 2318 | 'capital' => 'Warsaw', 2319 | 'flag' => '🇵🇱', 2320 | 'phone_code' => '48', 2321 | 'eu_member' => true, 2322 | ], 2323 | 'PT' => [ 2324 | 'alpha2' => 'PT', 2325 | 'alpha3' => 'PRT', 2326 | 'numeric' => '620', 2327 | 'tld' => '.pt', 2328 | 'currencies' => ['EUR',], 2329 | 'languages' => ['PT'], 2330 | 'continents' => ['EU'], 2331 | 'capital' => 'Lisboa', 2332 | 'flag' => '🇵🇹', 2333 | 'phone_code' => '351', 2334 | 'eu_member' => true, 2335 | ], 2336 | 'PR' => [ 2337 | 'alpha2' => 'PR', 2338 | 'alpha3' => 'PRI', 2339 | 'numeric' => '630', 2340 | 'tld' => '.pr', 2341 | 'currencies' => ['USD',], 2342 | 'languages' => ['ES', 'EN'], 2343 | 'continents' => ['NA'], 2344 | 'capital' => 'San Juan', 2345 | 'flag' => '🇵🇷', 2346 | 'phone_code' => '1787', 2347 | 'eu_member' => false, 2348 | ], 2349 | 'QA' => [ 2350 | 'alpha2' => 'QA', 2351 | 'alpha3' => 'QAT', 2352 | 'numeric' => '634', 2353 | 'tld' => '.qa', 2354 | 'currencies' => ['QAR',], 2355 | 'languages' => ['AR'], 2356 | 'continents' => ['AS'], 2357 | 'capital' => 'Doha', 2358 | 'flag' => '🇶🇦', 2359 | 'phone_code' => '974', 2360 | 'eu_member' => false, 2361 | ], 2362 | 'RE' => [ 2363 | 'alpha2' => 'RE', 2364 | 'alpha3' => 'REU', 2365 | 'numeric' => '638', 2366 | 'tld' => '.re', 2367 | 'currencies' => ['EUR',], 2368 | 'languages' => ['FR'], 2369 | 'continents' => ['AF'], 2370 | 'capital' => 'Saint-Denis', 2371 | 'flag' => '🇷🇪', 2372 | 'phone_code' => '262', 2373 | 'eu_member' => false, 2374 | ], 2375 | 'RO' => [ 2376 | 'alpha2' => 'RO', 2377 | 'alpha3' => 'ROU', 2378 | 'numeric' => '642', 2379 | 'tld' => '.ro', 2380 | 'currencies' => ['RON',], 2381 | 'languages' => ['RO'], 2382 | 'continents' => ['EU'], 2383 | 'capital' => 'Bucharest', 2384 | 'flag' => '🇷🇴', 2385 | 'phone_code' => '40', 2386 | 'eu_member' => true, 2387 | ], 2388 | 'RU' => [ 2389 | 'alpha2' => 'RU', 2390 | 'alpha3' => 'RUS', 2391 | 'numeric' => '643', 2392 | 'tld' => '.ru', 2393 | 'currencies' => ['RUB',], 2394 | 'languages' => ['RU'], 2395 | 'continents' => ['EU', 'AS'], 2396 | 'capital' => 'Moscow', 2397 | 'flag' => '🇷🇺', 2398 | 'phone_code' => '7', 2399 | 'eu_member' => false, 2400 | ], 2401 | 'RW' => [ 2402 | 'alpha2' => 'RW', 2403 | 'alpha3' => 'RWA', 2404 | 'numeric' => '646', 2405 | 'tld' => '.rw', 2406 | 'currencies' => ['RWF',], 2407 | 'languages' => ['EN', 'FR', 'RW', 'SW'], 2408 | 'continents' => ['AF'], 2409 | 'capital' => 'Kigali', 2410 | 'flag' => '🇷🇼', 2411 | 'phone_code' => '250', 2412 | 'eu_member' => false, 2413 | ], 2414 | 'BL' => [ 2415 | 'alpha2' => 'BL', 2416 | 'alpha3' => 'BLM', 2417 | 'numeric' => '652', 2418 | 'tld' => '.bl', 2419 | 'currencies' => ['EUR',], 2420 | 'languages' => ['FR'], 2421 | 'continents' => ['NA'], 2422 | 'capital' => 'Gustavia', 2423 | 'flag' => '🇧🇱', 2424 | 'phone_code' => '590', 2425 | 'eu_member' => false, 2426 | ], 2427 | 'SH' => [ 2428 | 'alpha2' => 'SH', 2429 | 'alpha3' => 'SHN', 2430 | 'numeric' => '654', 2431 | 'tld' => '.sh', 2432 | 'currencies' => ['SHP',], 2433 | 'languages' => ['EN'], 2434 | 'continents' => ['AF'], 2435 | 'capital' => NULL, 2436 | 'flag' => '🇸🇭', 2437 | 'phone_code' => NULL, 2438 | 'eu_member' => false, 2439 | ], 2440 | 'KN' => [ 2441 | 'alpha2' => 'KN', 2442 | 'alpha3' => 'KNA', 2443 | 'numeric' => '659', 2444 | 'tld' => '.kn', 2445 | 'currencies' => ['XCD',], 2446 | 'languages' => ['EN'], 2447 | 'continents' => ['NA'], 2448 | 'capital' => 'Basseterre', 2449 | 'flag' => '🇰🇳', 2450 | 'phone_code' => '1869', 2451 | 'eu_member' => false, 2452 | ], 2453 | 'LC' => [ 2454 | 'alpha2' => 'LC', 2455 | 'alpha3' => 'LCA', 2456 | 'numeric' => '662', 2457 | 'tld' => '.lc', 2458 | 'currencies' => ['XCD',], 2459 | 'languages' => ['EN'], 2460 | 'continents' => ['NA'], 2461 | 'capital' => 'Castries', 2462 | 'flag' => '🇱🇨', 2463 | 'phone_code' => '1758', 2464 | 'eu_member' => false, 2465 | ], 2466 | 'MF' => [ 2467 | 'alpha2' => 'MF', 2468 | 'alpha3' => 'MAF', 2469 | 'numeric' => '663', 2470 | 'tld' => '.mf', 2471 | 'currencies' => ['EUR', 'USD',], 2472 | 'languages' => ['FR'], 2473 | 'continents' => ['NA'], 2474 | 'capital' => 'Marigot', 2475 | 'flag' => '🇲🇫', 2476 | 'phone_code' => '590', 2477 | 'eu_member' => false, 2478 | ], 2479 | 'PM' => [ 2480 | 'alpha2' => 'PM', 2481 | 'alpha3' => 'SPM', 2482 | 'numeric' => '666', 2483 | 'tld' => '.pm', 2484 | 'currencies' => ['EUR',], 2485 | 'languages' => ['FR'], 2486 | 'continents' => ['NA'], 2487 | 'capital' => 'Saint-Pierre', 2488 | 'flag' => '🇵🇲', 2489 | 'phone_code' => '508', 2490 | 'eu_member' => false, 2491 | ], 2492 | 'VC' => [ 2493 | 'alpha2' => 'VC', 2494 | 'alpha3' => 'VCT', 2495 | 'numeric' => '670', 2496 | 'tld' => '.vc', 2497 | 'currencies' => ['XCD',], 2498 | 'languages' => ['EN'], 2499 | 'continents' => ['NA'], 2500 | 'capital' => 'Kingstown', 2501 | 'flag' => '🇻🇨', 2502 | 'phone_code' => '1784', 2503 | 'eu_member' => false, 2504 | ], 2505 | 'WS' => [ 2506 | 'alpha2' => 'WS', 2507 | 'alpha3' => 'WSM', 2508 | 'numeric' => '882', 2509 | 'tld' => '.ws', 2510 | 'currencies' => ['WST',], 2511 | 'languages' => ['EN'], 2512 | 'continents' => ['OC'], 2513 | 'capital' => 'Apia', 2514 | 'flag' => '🇼🇸', 2515 | 'phone_code' => '685', 2516 | 'eu_member' => false, 2517 | ], 2518 | 'SM' => [ 2519 | 'alpha2' => 'SM', 2520 | 'alpha3' => 'SMR', 2521 | 'numeric' => '674', 2522 | 'tld' => '.sm', 2523 | 'currencies' => ['EUR',], 2524 | 'languages' => ['IT'], 2525 | 'continents' => ['EU'], 2526 | 'capital' => 'City of San Marino', 2527 | 'flag' => '🇸🇲', 2528 | 'phone_code' => '378', 2529 | 'eu_member' => false, 2530 | ], 2531 | 'ST' => [ 2532 | 'alpha2' => 'ST', 2533 | 'alpha3' => 'STP', 2534 | 'numeric' => '678', 2535 | 'tld' => '.st', 2536 | 'currencies' => ['STN',], 2537 | 'languages' => ['PT'], 2538 | 'continents' => ['AF'], 2539 | 'capital' => 'São Tomé', 2540 | 'flag' => '🇸🇹', 2541 | 'phone_code' => '239', 2542 | 'eu_member' => false, 2543 | ], 2544 | 'SA' => [ 2545 | 'alpha2' => 'SA', 2546 | 'alpha3' => 'SAU', 2547 | 'numeric' => '682', 2548 | 'tld' => '.sa', 2549 | 'currencies' => ['SAR',], 2550 | 'languages' => ['AR'], 2551 | 'continents' => ['AS'], 2552 | 'capital' => 'Riyadh', 2553 | 'flag' => '🇸🇦', 2554 | 'phone_code' => '966', 2555 | 'eu_member' => false, 2556 | ], 2557 | 'SN' => [ 2558 | 'alpha2' => 'SN', 2559 | 'alpha3' => 'SEN', 2560 | 'numeric' => '686', 2561 | 'tld' => '.sn', 2562 | 'currencies' => ['XOF',], 2563 | 'languages' => ['FR'], 2564 | 'continents' => ['AF'], 2565 | 'capital' => 'Dakar', 2566 | 'flag' => '🇸🇳', 2567 | 'phone_code' => '221', 2568 | 'eu_member' => false, 2569 | ], 2570 | 'RS' => [ 2571 | 'alpha2' => 'RS', 2572 | 'alpha3' => 'SRB', 2573 | 'numeric' => '688', 2574 | 'tld' => '.rs', 2575 | 'currencies' => ['RSD',], 2576 | 'languages' => ['SR'], 2577 | 'continents' => ['EU'], 2578 | 'capital' => 'Belgrade', 2579 | 'flag' => '🇷🇸', 2580 | 'phone_code' => '381', 2581 | 'eu_member' => false, 2582 | ], 2583 | 'SC' => [ 2584 | 'alpha2' => 'SC', 2585 | 'alpha3' => 'SYC', 2586 | 'numeric' => '690', 2587 | 'tld' => '.sc', 2588 | 'currencies' => ['SCR',], 2589 | 'languages' => ['EN', 'FR', 'CRS'], 2590 | 'continents' => ['AF'], 2591 | 'capital' => 'Victoria', 2592 | 'flag' => '🇸🇨', 2593 | 'phone_code' => '248', 2594 | 'eu_member' => false, 2595 | ], 2596 | 'SL' => [ 2597 | 'alpha2' => 'SL', 2598 | 'alpha3' => 'SLE', 2599 | 'numeric' => '694', 2600 | 'tld' => '.sl', 2601 | 'currencies' => ['SLL',], 2602 | 'languages' => ['EN'], 2603 | 'continents' => ['AF'], 2604 | 'capital' => 'Freetown', 2605 | 'flag' => '🇸🇱', 2606 | 'phone_code' => '232', 2607 | 'eu_member' => false, 2608 | ], 2609 | 'SG' => [ 2610 | 'alpha2' => 'SG', 2611 | 'alpha3' => 'SGP', 2612 | 'numeric' => '702', 2613 | 'tld' => '.sg', 2614 | 'currencies' => ['SGD',], 2615 | 'languages' => ['EN', 'MS', 'ZH', 'TA'], 2616 | 'continents' => ['AS'], 2617 | 'capital' => 'Singapore', 2618 | 'flag' => '🇸🇬', 2619 | 'phone_code' => '65', 2620 | 'eu_member' => false, 2621 | ], 2622 | 'SX' => [ 2623 | 'alpha2' => 'SX', 2624 | 'alpha3' => 'SXM', 2625 | 'numeric' => '534', 2626 | 'tld' => '.sx', 2627 | 'currencies' => ['ANG',], 2628 | 'languages' => ['NL', 'EN'], 2629 | 'continents' => ['NA'], 2630 | 'capital' => 'Philipsburg', 2631 | 'flag' => '🇸🇽', 2632 | 'phone_code' => '1721', 2633 | 'eu_member' => false, 2634 | ], 2635 | 'SK' => [ 2636 | 'alpha2' => 'SK', 2637 | 'alpha3' => 'SVK', 2638 | 'numeric' => '703', 2639 | 'tld' => '.sk', 2640 | 'currencies' => ['EUR',], 2641 | 'languages' => ['SK'], 2642 | 'continents' => ['EU'], 2643 | 'capital' => 'Bratislava', 2644 | 'flag' => '🇸🇰', 2645 | 'phone_code' => '421', 2646 | 'eu_member' => true, 2647 | ], 2648 | 'SI' => [ 2649 | 'alpha2' => 'SI', 2650 | 'alpha3' => 'SVN', 2651 | 'numeric' => '705', 2652 | 'tld' => '.si', 2653 | 'currencies' => ['EUR',], 2654 | 'languages' => ['SL'], 2655 | 'continents' => ['EU'], 2656 | 'capital' => 'Ljubljana', 2657 | 'flag' => '🇸🇮', 2658 | 'phone_code' => '386', 2659 | 'eu_member' => true, 2660 | ], 2661 | 'SB' => [ 2662 | 'alpha2' => 'SB', 2663 | 'alpha3' => 'SLB', 2664 | 'numeric' => '090', 2665 | 'tld' => '.sb', 2666 | 'currencies' => ['SBD',], 2667 | 'languages' => ['EN'], 2668 | 'continents' => ['OC'], 2669 | 'capital' => 'Honiara', 2670 | 'flag' => '🇸🇧', 2671 | 'phone_code' => '677', 2672 | 'eu_member' => false, 2673 | ], 2674 | 'SO' => [ 2675 | 'alpha2' => 'SO', 2676 | 'alpha3' => 'SOM', 2677 | 'numeric' => '706', 2678 | 'tld' => '.so', 2679 | 'currencies' => ['SOS',], 2680 | 'languages' => ['SO', 'AR'], 2681 | 'continents' => ['AF'], 2682 | 'capital' => 'Mogadishu', 2683 | 'flag' => '🇸🇴', 2684 | 'phone_code' => '252', 2685 | 'eu_member' => false, 2686 | ], 2687 | 'ZA' => [ 2688 | 'alpha2' => 'ZA', 2689 | 'alpha3' => 'ZAF', 2690 | 'numeric' => '710', 2691 | 'tld' => '.za', 2692 | 'currencies' => ['ZAR',], 2693 | 'languages' => ['EN', 'ZU', 'XH', 'AF'], 2694 | 'continents' => ['AF'], 2695 | 'capital' => 'Pretoria', 2696 | 'flag' => '🇿🇦', 2697 | 'phone_code' => '27', 2698 | 'eu_member' => false, 2699 | ], 2700 | 'GS' => [ 2701 | 'alpha2' => 'GS', 2702 | 'alpha3' => 'SGS', 2703 | 'numeric' => '239', 2704 | 'tld' => '.gs', 2705 | 'currencies' => ['GBP',], 2706 | 'languages' => ['EN'], 2707 | 'continents' => ['AN'], 2708 | 'capital' => 'King Edward Point', 2709 | 'flag' => '🇬🇸', 2710 | 'phone_code' => '500', 2711 | 'eu_member' => false, 2712 | ], 2713 | 'SS' => [ 2714 | 'alpha2' => 'SS', 2715 | 'alpha3' => 'SSD', 2716 | 'numeric' => '728', 2717 | 'tld' => '.ss', 2718 | 'currencies' => ['SSP',], 2719 | 'languages' => ['EN'], 2720 | 'continents' => ['AF'], 2721 | 'capital' => 'Juba', 2722 | 'flag' => '🇸🇸', 2723 | 'phone_code' => '211', 2724 | 'eu_member' => false, 2725 | ], 2726 | 'ES' => [ 2727 | 'alpha2' => 'ES', 2728 | 'alpha3' => 'ESP', 2729 | 'numeric' => '724', 2730 | 'tld' => '.es', 2731 | 'currencies' => ['EUR',], 2732 | 'languages' => ['ES', 'CA', 'GL', 'EU'], 2733 | 'continents' => ['EU'], 2734 | 'capital' => 'Madrid', 2735 | 'flag' => '🇪🇸', 2736 | 'phone_code' => '34', 2737 | 'eu_member' => true, 2738 | ], 2739 | 'LK' => [ 2740 | 'alpha2' => 'LK', 2741 | 'alpha3' => 'LKA', 2742 | 'numeric' => '144', 2743 | 'tld' => '.lk', 2744 | 'currencies' => ['LKR',], 2745 | 'languages' => ['SI', 'TA'], 2746 | 'continents' => ['AS'], 2747 | 'capital' => 'Colombo', 2748 | 'flag' => '🇱🇰', 2749 | 'phone_code' => '94', 2750 | 'eu_member' => false, 2751 | ], 2752 | 'SD' => [ 2753 | 'alpha2' => 'SD', 2754 | 'alpha3' => 'SDN', 2755 | 'numeric' => '729', 2756 | 'tld' => '.sd', 2757 | 'currencies' => ['SDG',], 2758 | 'languages' => ['EN'], 2759 | 'continents' => ['AF'], 2760 | 'capital' => 'Khartoum', 2761 | 'flag' => '🇸🇩', 2762 | 'phone_code' => '249', 2763 | 'eu_member' => false, 2764 | ], 2765 | 'SR' => [ 2766 | 'alpha2' => 'SR', 2767 | 'alpha3' => 'SUR', 2768 | 'numeric' => '740', 2769 | 'tld' => '.sr', 2770 | 'currencies' => ['SRD',], 2771 | 'languages' => ['NL'], 2772 | 'continents' => ['SA'], 2773 | 'capital' => 'Paramaribo', 2774 | 'flag' => '🇸🇷', 2775 | 'phone_code' => '597', 2776 | 'eu_member' => false, 2777 | ], 2778 | 'SJ' => [ 2779 | 'alpha2' => 'SJ', 2780 | 'alpha3' => 'SJM', 2781 | 'numeric' => '744', 2782 | 'tld' => '.sj', 2783 | 'currencies' => ['NOK',], 2784 | 'languages' => ['NO'], 2785 | 'continents' => ['EU'], 2786 | 'capital' => 'Longyearbyen', 2787 | 'flag' => '🇸🇯', 2788 | 'phone_code' => '4779', 2789 | 'eu_member' => false, 2790 | ], 2791 | 'SE' => [ 2792 | 'alpha2' => 'SE', 2793 | 'alpha3' => 'SWE', 2794 | 'numeric' => '752', 2795 | 'tld' => '.se', 2796 | 'currencies' => ['SEK',], 2797 | 'languages' => ['SV'], 2798 | 'continents' => ['EU'], 2799 | 'capital' => 'Stockholm', 2800 | 'flag' => '🇸🇪', 2801 | 'phone_code' => '46', 2802 | 'eu_member' => true, 2803 | ], 2804 | 'CH' => [ 2805 | 'alpha2' => 'CH', 2806 | 'alpha3' => 'CHE', 2807 | 'numeric' => '756', 2808 | 'tld' => '.ch', 2809 | 'currencies' => ['CHF',], 2810 | 'languages' => ['FR', 'DE', 'IT', 'RM'], 2811 | 'continents' => ['EU'], 2812 | 'capital' => 'Bern', 2813 | 'flag' => '🇨🇭', 2814 | 'phone_code' => '41', 2815 | 'eu_member' => false, 2816 | ], 2817 | 'SY' => [ 2818 | 'alpha2' => 'SY', 2819 | 'alpha3' => 'SYR', 2820 | 'numeric' => '760', 2821 | 'tld' => '.sy', 2822 | 'currencies' => ['SYP',], 2823 | 'languages' => ['AR'], 2824 | 'continents' => ['AS'], 2825 | 'capital' => 'Damascus', 2826 | 'flag' => '🇸🇾', 2827 | 'phone_code' => '963', 2828 | 'eu_member' => false, 2829 | ], 2830 | 'TW' => [ 2831 | 'alpha2' => 'TW', 2832 | 'alpha3' => 'TWN', 2833 | 'numeric' => '158', 2834 | 'tld' => '.tw', 2835 | 'currencies' => ['TWD',], 2836 | 'languages' => ['ZH'], 2837 | 'continents' => ['AS'], 2838 | 'capital' => 'Taipei', 2839 | 'flag' => '🇹🇼', 2840 | 'phone_code' => '886', 2841 | 'eu_member' => false, 2842 | ], 2843 | 'TJ' => [ 2844 | 'alpha2' => 'TJ', 2845 | 'alpha3' => 'TJK', 2846 | 'numeric' => '762', 2847 | 'tld' => '.tj', 2848 | 'currencies' => ['TJS',], 2849 | 'languages' => ['TG'], 2850 | 'continents' => ['AS'], 2851 | 'capital' => 'Dushanbe', 2852 | 'flag' => '🇹🇯', 2853 | 'phone_code' => '992', 2854 | 'eu_member' => false, 2855 | ], 2856 | 'TZ' => [ 2857 | 'alpha2' => 'TZ', 2858 | 'alpha3' => 'TZA', 2859 | 'numeric' => '834', 2860 | 'tld' => '.tz', 2861 | 'currencies' => ['TZS',], 2862 | 'languages' => ['EN'], 2863 | 'continents' => ['AF'], 2864 | 'capital' => 'Dodoma', 2865 | 'flag' => '🇹🇿', 2866 | 'phone_code' => '255', 2867 | 'eu_member' => false, 2868 | ], 2869 | 'TH' => [ 2870 | 'alpha2' => 'TH', 2871 | 'alpha3' => 'THA', 2872 | 'numeric' => '764', 2873 | 'tld' => '.th', 2874 | 'currencies' => ['THB',], 2875 | 'languages' => ['TH'], 2876 | 'continents' => ['AS'], 2877 | 'capital' => 'Bangkok', 2878 | 'flag' => '🇹🇭', 2879 | 'phone_code' => '66', 2880 | 'eu_member' => false, 2881 | ], 2882 | 'TL' => [ 2883 | 'alpha2' => 'TL', 2884 | 'alpha3' => 'TLS', 2885 | 'numeric' => '626', 2886 | 'tld' => '.tl', 2887 | 'currencies' => ['USD',], 2888 | 'languages' => ['PT', 'TDT'], 2889 | 'continents' => ['AS'], 2890 | 'capital' => 'Dili', 2891 | 'flag' => '🇹🇱', 2892 | 'phone_code' => '670', 2893 | 'eu_member' => false, 2894 | ], 2895 | 'TG' => [ 2896 | 'alpha2' => 'TG', 2897 | 'alpha3' => 'TGO', 2898 | 'numeric' => '768', 2899 | 'tld' => '.tg', 2900 | 'currencies' => ['XOF',], 2901 | 'languages' => ['FR'], 2902 | 'continents' => ['AF'], 2903 | 'capital' => 'Lomé', 2904 | 'flag' => '🇹🇬', 2905 | 'phone_code' => '228', 2906 | 'eu_member' => false, 2907 | ], 2908 | 'TK' => [ 2909 | 'alpha2' => 'TK', 2910 | 'alpha3' => 'TKL', 2911 | 'numeric' => '772', 2912 | 'tld' => '.tk', 2913 | 'currencies' => ['NZD',], 2914 | 'languages' => ['EN', 'TKL'], 2915 | 'continents' => ['OC'], 2916 | 'capital' => 'Fakaofo', 2917 | 'flag' => '🇹🇰', 2918 | 'phone_code' => '690', 2919 | 'eu_member' => false, 2920 | ], 2921 | 'TO' => [ 2922 | 'alpha2' => 'TO', 2923 | 'alpha3' => 'TON', 2924 | 'numeric' => '776', 2925 | 'tld' => '.to', 2926 | 'currencies' => ['TOP',], 2927 | 'languages' => ['EN', 'TO'], 2928 | 'continents' => ['OC'], 2929 | 'capital' => 'Nuku\'alofa', 2930 | 'flag' => '🇹🇴', 2931 | 'phone_code' => '676', 2932 | 'eu_member' => false, 2933 | ], 2934 | 'TT' => [ 2935 | 'alpha2' => 'TT', 2936 | 'alpha3' => 'TTO', 2937 | 'numeric' => '780', 2938 | 'tld' => '.tt', 2939 | 'currencies' => ['TTD',], 2940 | 'languages' => ['EN'], 2941 | 'continents' => ['NA'], 2942 | 'capital' => 'Port of Spain', 2943 | 'flag' => '🇹🇹', 2944 | 'phone_code' => '1868', 2945 | 'eu_member' => false, 2946 | ], 2947 | 'TN' => [ 2948 | 'alpha2' => 'TN', 2949 | 'alpha3' => 'TUN', 2950 | 'numeric' => '788', 2951 | 'tld' => '.tn', 2952 | 'currencies' => ['TND',], 2953 | 'languages' => ['AR', 'FR'], 2954 | 'continents' => ['AF'], 2955 | 'capital' => 'Tunis', 2956 | 'flag' => '🇹🇳', 2957 | 'phone_code' => '216', 2958 | 'eu_member' => false, 2959 | ], 2960 | 'TR' => [ 2961 | 'alpha2' => 'TR', 2962 | 'alpha3' => 'TUR', 2963 | 'numeric' => '792', 2964 | 'tld' => '.tr', 2965 | 'currencies' => ['TRY',], 2966 | 'languages' => ['TR'], 2967 | 'continents' => ['AS', 'EU'], 2968 | 'capital' => 'Ankara', 2969 | 'flag' => '🇹🇷', 2970 | 'phone_code' => '90', 2971 | 'eu_member' => false, 2972 | ], 2973 | 'TM' => [ 2974 | 'alpha2' => 'TM', 2975 | 'alpha3' => 'TKM', 2976 | 'numeric' => '795', 2977 | 'tld' => '.tm', 2978 | 'currencies' => ['TMT',], 2979 | 'languages' => ['TK'], 2980 | 'continents' => ['AS'], 2981 | 'capital' => 'Ashgabat', 2982 | 'flag' => '🇹🇲', 2983 | 'phone_code' => '993', 2984 | 'eu_member' => false, 2985 | ], 2986 | 'TC' => [ 2987 | 'alpha2' => 'TC', 2988 | 'alpha3' => 'TCA', 2989 | 'numeric' => '796', 2990 | 'tld' => '.tc', 2991 | 'currencies' => ['USD',], 2992 | 'languages' => ['EN'], 2993 | 'continents' => ['NA'], 2994 | 'capital' => 'Cockburn Town', 2995 | 'flag' => '🇹🇨', 2996 | 'phone_code' => '1649', 2997 | 'eu_member' => false, 2998 | ], 2999 | 'TV' => [ 3000 | 'alpha2' => 'TV', 3001 | 'alpha3' => 'TUV', 3002 | 'numeric' => '798', 3003 | 'tld' => '.tv', 3004 | 'currencies' => ['AUD',], 3005 | 'languages' => ['TVL', 'EN'], 3006 | 'continents' => ['OC'], 3007 | 'capital' => 'Funafuti', 3008 | 'flag' => '🇹🇻', 3009 | 'phone_code' => '688', 3010 | 'eu_member' => false, 3011 | ], 3012 | 'UG' => [ 3013 | 'alpha2' => 'UG', 3014 | 'alpha3' => 'UGA', 3015 | 'numeric' => '800', 3016 | 'tld' => '.ug', 3017 | 'currencies' => ['UGX',], 3018 | 'languages' => ['EN', 'SW'], 3019 | 'continents' => ['AF'], 3020 | 'capital' => 'Kampala', 3021 | 'flag' => '🇺🇬', 3022 | 'phone_code' => '256', 3023 | 'eu_member' => false, 3024 | ], 3025 | 'UA' => [ 3026 | 'alpha2' => 'UA', 3027 | 'alpha3' => 'UKR', 3028 | 'numeric' => '804', 3029 | 'tld' => '.ua', 3030 | 'currencies' => ['UAH',], 3031 | 'languages' => ['UK', 'RU'], 3032 | 'continents' => ['EU'], 3033 | 'capital' => 'Kyiv', 3034 | 'flag' => '🇺🇦', 3035 | 'phone_code' => '380', 3036 | 'eu_member' => false, 3037 | ], 3038 | 'AE' => [ 3039 | 'alpha2' => 'AE', 3040 | 'alpha3' => 'ARE', 3041 | 'numeric' => '784', 3042 | 'tld' => '.ae', 3043 | 'currencies' => ['AED',], 3044 | 'languages' => ['AR'], 3045 | 'continents' => ['AS'], 3046 | 'capital' => 'Abu Dhabi', 3047 | 'flag' => '🇦🇪', 3048 | 'phone_code' => '971', 3049 | 'eu_member' => false, 3050 | ], 3051 | 'GB' => [ 3052 | 'alpha2' => 'GB', 3053 | 'alpha3' => 'GBR', 3054 | 'numeric' => '826', 3055 | 'tld' => '.uk', 3056 | 'currencies' => ['GBP',], 3057 | 'languages' => ['EN', 'KW', 'GA', 'GD', 'CY', 'GV'], 3058 | 'continents' => ['EU'], 3059 | 'capital' => 'London', 3060 | 'flag' => '🇬🇧', 3061 | 'phone_code' => '44', 3062 | 'eu_member' => false, 3063 | ], 3064 | 'US' => [ 3065 | 'alpha2' => 'US', 3066 | 'alpha3' => 'USA', 3067 | 'numeric' => '840', 3068 | 'tld' => '.us', 3069 | 'currencies' => ['USD',], 3070 | 'languages' => ['EN'], 3071 | 'continents' => ['NA'], 3072 | 'capital' => 'Washington D.C.', 3073 | 'flag' => '🇺🇸', 3074 | 'phone_code' => '1', 3075 | 'eu_member' => false, 3076 | ], 3077 | 'UM' => [ 3078 | 'alpha2' => 'UM', 3079 | 'alpha3' => 'UMI', 3080 | 'numeric' => '581', 3081 | 'tld' => '.um', 3082 | 'currencies' => ['USD',], 3083 | 'languages' => ['EN'], 3084 | 'continents' => ['OC'], 3085 | 'capital' => null, 3086 | 'flag' => '🇺🇲', 3087 | 'phone_code' => '246', 3088 | 'eu_member' => false, 3089 | ], 3090 | 'UY' => [ 3091 | 'alpha2' => 'UY', 3092 | 'alpha3' => 'URY', 3093 | 'numeric' => '858', 3094 | 'tld' => '.uy', 3095 | 'currencies' => ['UYU',], 3096 | 'languages' => ['ES'], 3097 | 'continents' => ['SA'], 3098 | 'capital' => 'Montevideo', 3099 | 'flag' => '🇺🇾', 3100 | 'phone_code' => '598', 3101 | 'eu_member' => false, 3102 | ], 3103 | 'UZ' => [ 3104 | 'alpha2' => 'UZ', 3105 | 'alpha3' => 'UZB', 3106 | 'numeric' => '860', 3107 | 'tld' => '.uz', 3108 | 'currencies' => ['UZS',], 3109 | 'languages' => ['UZ'], 3110 | 'continents' => ['AS'], 3111 | 'capital' => 'Tashkent', 3112 | 'flag' => '🇺🇿', 3113 | 'phone_code' => '998', 3114 | 'eu_member' => false, 3115 | ], 3116 | 'VU' => [ 3117 | 'alpha2' => 'VU', 3118 | 'alpha3' => 'VUT', 3119 | 'numeric' => '548', 3120 | 'tld' => '.vu', 3121 | 'currencies' => ['VUV',], 3122 | 'languages' => ['EN', 'FR'], 3123 | 'continents' => ['OC'], 3124 | 'capital' => 'Port Vila', 3125 | 'flag' => '🇻🇺', 3126 | 'phone_code' => '678', 3127 | 'eu_member' => false, 3128 | ], 3129 | 'VE' => [ 3130 | 'alpha2' => 'VE', 3131 | 'alpha3' => 'VEN', 3132 | 'numeric' => '862', 3133 | 'tld' => '.ve', 3134 | 'currencies' => ['VEF',], 3135 | 'languages' => ['ES'], 3136 | 'continents' => ['SA'], 3137 | 'capital' => 'Caracas', 3138 | 'flag' => '🇻🇪', 3139 | 'phone_code' => '58', 3140 | 'eu_member' => false, 3141 | ], 3142 | 'VN' => [ 3143 | 'alpha2' => 'VN', 3144 | 'alpha3' => 'VNM', 3145 | 'numeric' => '704', 3146 | 'tld' => '.vn', 3147 | 'currencies' => ['VND',], 3148 | 'languages' => ['VI'], 3149 | 'continents' => ['AS'], 3150 | 'capital' => 'Hanoi', 3151 | 'flag' => '🇻🇳', 3152 | 'phone_code' => '84', 3153 | 'eu_member' => false, 3154 | ], 3155 | 'VG' => [ 3156 | 'alpha2' => 'VG', 3157 | 'alpha3' => 'VGB', 3158 | 'numeric' => '092', 3159 | 'tld' => '.vg', 3160 | 'currencies' => ['USD',], 3161 | 'languages' => ['EN'], 3162 | 'continents' => ['NA'], 3163 | 'capital' => 'Road Town', 3164 | 'flag' => '🇻🇬', 3165 | 'phone_code' => '1284', 3166 | 'eu_member' => false, 3167 | ], 3168 | 'VI' => [ 3169 | 'alpha2' => 'VI', 3170 | 'alpha3' => 'VIR', 3171 | 'numeric' => '850', 3172 | 'tld' => '.vi', 3173 | 'currencies' => ['USD',], 3174 | 'languages' => ['EN'], 3175 | 'continents' => ['NA'], 3176 | 'capital' => 'Charlotte Amalie', 3177 | 'flag' => '🇻🇮', 3178 | 'phone_code' => '1340', 3179 | 'eu_member' => false, 3180 | ], 3181 | 'WF' => [ 3182 | 'alpha2' => 'WF', 3183 | 'alpha3' => 'WLF', 3184 | 'numeric' => '876', 3185 | 'tld' => '.wf', 3186 | 'currencies' => ['XPF',], 3187 | 'languages' => ['FR'], 3188 | 'continents' => ['OC'], 3189 | 'capital' => 'Mata-Utu', 3190 | 'flag' => '🇼🇫', 3191 | 'phone_code' => '681', 3192 | 'eu_member' => false, 3193 | ], 3194 | 'EH' => [ 3195 | 'alpha2' => 'EH', 3196 | 'alpha3' => 'ESH', 3197 | 'numeric' => '732', 3198 | 'tld' => '.eh', 3199 | 'currencies' => ['MAD',], 3200 | 'languages' => ['AR', 'ES'], 3201 | 'continents' => ['AF'], 3202 | 'capital' => 'El Aaiún', 3203 | 'flag' => '🇪🇭', 3204 | 'phone_code' => '212', 3205 | 'eu_member' => false, 3206 | ], 3207 | 'YE' => [ 3208 | 'alpha2' => 'YE', 3209 | 'alpha3' => 'YEM', 3210 | 'numeric' => '887', 3211 | 'tld' => '.ye', 3212 | 'currencies' => ['YER',], 3213 | 'languages' => ['AR'], 3214 | 'continents' => ['AS'], 3215 | 'capital' => 'Sana\'a', 3216 | 'flag' => '🇾🇪', 3217 | 'phone_code' => '967', 3218 | 'eu_member' => false, 3219 | ], 3220 | 'ZM' => [ 3221 | 'alpha2' => 'ZM', 3222 | 'alpha3' => 'ZMB', 3223 | 'numeric' => '894', 3224 | 'tld' => '.zm', 3225 | 'currencies' => ['ZMW',], 3226 | 'languages' => ['EN'], 3227 | 'continents' => ['AF'], 3228 | 'capital' => 'Lusaka', 3229 | 'flag' => '🇿🇲', 3230 | 'phone_code' => '260', 3231 | 'eu_member' => false, 3232 | ], 3233 | 'ZW' => [ 3234 | 'alpha2' => 'ZW', 3235 | 'alpha3' => 'ZWE', 3236 | 'numeric' => '716', 3237 | 'tld' => '.zw', 3238 | 'currencies' => ['BWP', 'EUR', 'GBP', 'USD', 'ZAR',], 3239 | 'languages' => ['NY', 'EN', 'KCK'], 3240 | 'continents' => ['AF'], 3241 | 'capital' => 'Harare', 3242 | 'flag' => '🇿🇼', 3243 | 'phone_code' => '263', 3244 | 'eu_member' => false, 3245 | ], 3246 | ]; 3247 | 3248 | 3249 | /** 3250 | * Contains the capital timezones (or compatible) for countries that has more than 1 timezone. 3251 | * In case of autonomous regions it contains the most compatible timezone. 3252 | * 3253 | * @var array|string[] 3254 | */ 3255 | protected array $mainTimezones = [ 3256 | 'AR' => 'America/Argentina/Buenos_Aires', 3257 | 'AU' => 'Australia/Sydney', 3258 | 'BV' => 'Africa/Johannesburg', 3259 | 'CA' => 'America/Toronto', 3260 | 'CD' => 'Africa/Kinshasa', 3261 | 'CL' => 'America/Santiago', 3262 | 'CN' => 'Asia/Shanghai', 3263 | 'EC' => 'America/Guayaquil', 3264 | 'ES' => 'Europe/Madrid', 3265 | 'FM' => 'Pacific/Chuuk', 3266 | 'GL' => 'America/Godthab', 3267 | 'HM' => 'Australia/Perth', 3268 | 'ID' => 'Asia/Jakarta', 3269 | 'KI' => 'Pacific/Tarawa', 3270 | 'KZ' => 'Asia/Almaty', 3271 | 'MH' => 'Pacific/Majuro', 3272 | 'MN' => 'Asia/Ulaanbaatar', 3273 | 'MX' => 'America/Mexico_City', 3274 | 'MY' => 'Asia/Kuala_Lumpur', 3275 | 'NZ' => 'Pacific/Auckland', 3276 | 'PF' => 'Pacific/Tahiti', 3277 | 'PG' => 'Pacific/Port_Moresby', 3278 | 'PS' => 'Asia/Gaza', 3279 | 'PT' => 'Europe/Lisbon', 3280 | 'RU' => 'Europe/Moscow', 3281 | 'TF' => 'Indian/Kerguelen', 3282 | 'UA' => 'Europe/Kiev', 3283 | 'UM' => 'Pacific/Midway', 3284 | 'US' => 'America/New_York', 3285 | 'UZ' => 'Asia/Samarkand', 3286 | ]; 3287 | 3288 | 3289 | /** 3290 | * Retrieve all the elements from the database. 3291 | * 3292 | * @return array 3293 | */ 3294 | public function all(): array 3295 | { 3296 | // Populate timezones. 3297 | // PHP already has the different timezones, so it's not required to create a complete list of timezones. 3298 | return Arr::map( 3299 | $this->db, 3300 | function (array $data, string $alpha2) { 3301 | $zones = \DateTimeZone::listIdentifiers(\DateTimeZone::PER_COUNTRY, $alpha2); 3302 | 3303 | if ($this->mainTimezones[$alpha2] ?? null) { 3304 | 3305 | if (count($zones)) { 3306 | $zones = array_filter($zones, fn($zone) => $zone !== $this->mainTimezones[$alpha2]); 3307 | array_unshift($zones, $this->mainTimezones[$alpha2]); 3308 | } else { 3309 | $zones = [$this->mainTimezones[$alpha2]]; 3310 | } 3311 | } 3312 | 3313 | $data['timezones'] = $zones; 3314 | 3315 | return $data; 3316 | } 3317 | ); 3318 | 3319 | } 3320 | } 3321 | -------------------------------------------------------------------------------- /src/Data/Currencies/CurrenciesEN.php: -------------------------------------------------------------------------------- 1 | 'UAE Dirham', 16 | 'AFN' => 'Afghani', 17 | 'ALL' => 'Lek', 18 | 'AMD' => 'Armenian Dram', 19 | 'ANG' => 'Netherlands Antillean Guilder', 20 | 'AOA' => 'Kwanza', 21 | 'ARS' => 'Argentine Peso', 22 | 'AUD' => 'Australian Dollar', 23 | 'AWG' => 'Aruban Florin', 24 | 'AZN' => 'Azerbaijanian Manat', 25 | 'BAM' => 'Convertible Mark', 26 | 'BBD' => 'Barbados Dollar', 27 | 'BDT' => 'Taka', 28 | 'BGN' => 'Bulgarian Lev', 29 | 'BHD' => 'Bahraini Dinar', 30 | 'BIF' => 'Burundi Franc', 31 | 'BMD' => 'Bermudian Dollar', 32 | 'BND' => 'Brunei Dollar', 33 | 'BOB' => 'Boliviano', 34 | 'BOV' => 'Mvdol', 35 | 'BRL' => 'Brazilian Real', 36 | 'BSD' => 'Bahamian Dollar', 37 | 'BTN' => 'Ngultrum', 38 | 'BWP' => 'Pula', 39 | 'BYN' => 'Belarussian Ruble', 40 | 'BZD' => 'Belize Dollar', 41 | 'CAD' => 'Canadian Dollar', 42 | 'CDF' => 'Congolese Franc', 43 | 'CHE' => 'WIR Euro', 44 | 'CHF' => 'Swiss Franc', 45 | 'CHW' => 'WIR Franc', 46 | 'CLF' => 'Unidad de Fomento', 47 | 'CLP' => 'Chilean Peso', 48 | 'CNY' => 'Yuan Renminbi', 49 | 'COP' => 'Colombian Peso', 50 | 'COU' => 'Unidad de Valor Real', 51 | 'CRC' => 'Costa Rican Colon', 52 | 'CUC' => 'Peso Convertible', 53 | 'CUP' => 'Cuban Peso', 54 | 'CVE' => 'Cabo Verde Escudo', 55 | 'CZK' => 'Czech Koruna', 56 | 'DJF' => 'Djibouti Franc', 57 | 'DKK' => 'Danish Krone', 58 | 'DOP' => 'Dominican Peso', 59 | 'DZD' => 'Algerian Dinar', 60 | 'EGP' => 'Egyptian Pound', 61 | 'ERN' => 'Nakfa', 62 | 'ETB' => 'Ethiopian Birr', 63 | 'EUR' => 'Euro', 64 | 'FJD' => 'Fiji Dollar', 65 | 'FKP' => 'Falkland Islands Pound', 66 | 'GBP' => 'Pound Sterling', 67 | 'GEL' => 'Lari', 68 | 'GHS' => 'Ghana Cedi', 69 | 'GIP' => 'Gibraltar Pound', 70 | 'GMD' => 'Dalasi', 71 | 'GNF' => 'Guinea Franc', 72 | 'GTQ' => 'Quetzal', 73 | 'GYD' => 'Guyana Dollar', 74 | 'HKD' => 'Hong Kong Dollar', 75 | 'HNL' => 'Lempira', 76 | 'HRK' => 'Kuna', 77 | 'HTG' => 'Gourde', 78 | 'HUF' => 'Forint', 79 | 'IDR' => 'Rupiah', 80 | 'ILS' => 'New Israeli Sheqel', 81 | 'INR' => 'Indian Rupee', 82 | 'IQD' => 'Iraqi Dinar', 83 | 'IRR' => 'Iranian Rial', 84 | 'ISK' => 'Iceland Krona', 85 | 'JMD' => 'Jamaican Dollar', 86 | 'JOD' => 'Jordanian Dinar', 87 | 'JPY' => 'Yen', 88 | 'KES' => 'Kenyan Shilling', 89 | 'KGS' => 'Som', 90 | 'KHR' => 'Riel', 91 | 'KMF' => 'Comoro Franc', 92 | 'KPW' => 'North Korean Won', 93 | 'KRW' => 'Won', 94 | 'KWD' => 'Kuwaiti Dinar', 95 | 'KYD' => 'Cayman Islands Dollar', 96 | 'KZT' => 'Tenge', 97 | 'LAK' => 'Kip', 98 | 'LBP' => 'Lebanese Pound', 99 | 'LKR' => 'Sri Lanka Rupee', 100 | 'LRD' => 'Liberian Dollar', 101 | 'LSL' => 'Loti', 102 | 'LYD' => 'Libyan Dinar', 103 | 'MAD' => 'Moroccan Dirham', 104 | 'MDL' => 'Moldovan Leu', 105 | 'MGA' => 'Malagasy Ariary', 106 | 'MKD' => 'Denar', 107 | 'MMK' => 'Kyat', 108 | 'MNT' => 'Tugrik', 109 | 'MOP' => 'Pataca', 110 | 'MRU' => 'Ouguiya', 111 | 'MUR' => 'Mauritius Rupee', 112 | 'MVR' => 'Rufiyaa', 113 | 'MWK' => 'Kwacha', 114 | 'MXN' => 'Mexican Peso', 115 | 'MXV' => 'Mexican Unidad de Inversion (UDI)', 116 | 'MYR' => 'Malaysian Ringgit', 117 | 'MZN' => 'Mozambique Metical', 118 | 'NAD' => 'Namibia Dollar', 119 | 'NGN' => 'Naira', 120 | 'NIO' => 'Cordoba Oro', 121 | 'NOK' => 'Norwegian Krone', 122 | 'NPR' => 'Nepalese Rupee', 123 | 'NZD' => 'New Zealand Dollar', 124 | 'OMR' => 'Rial Omani', 125 | 'PAB' => 'Balboa', 126 | 'PEN' => 'Nuevo Sol', 127 | 'PGK' => 'Kina', 128 | 'PHP' => 'Philippine Peso', 129 | 'PKR' => 'Pakistan Rupee', 130 | 'PLN' => 'Zloty', 131 | 'PYG' => 'Guarani', 132 | 'QAR' => 'Qatari Rial', 133 | 'RON' => 'Romanian Leu', 134 | 'RSD' => 'Serbian Dinar', 135 | 'RUB' => 'Russian Ruble', 136 | 'RWF' => 'Rwanda Franc', 137 | 'SAR' => 'Saudi Riyal', 138 | 'SBD' => 'Solomon Islands Dollar', 139 | 'SCR' => 'Seychelles Rupee', 140 | 'SDG' => 'Sudanese Pound', 141 | 'SEK' => 'Swedish Krona', 142 | 'SGD' => 'Singapore Dollar', 143 | 'SHP' => 'Saint Helena Pound', 144 | 'SLL' => 'Leone', 145 | 'SOS' => 'Somali Shilling', 146 | 'SRD' => 'Surinam Dollar', 147 | 'SSP' => 'South Sudanese Pound', 148 | 'STN' => 'Dobra', 149 | 'SVC' => 'El Salvador Colon', 150 | 'SYP' => 'Syrian Pound', 151 | 'SZL' => 'Lilangeni', 152 | 'THB' => 'Baht', 153 | 'TJS' => 'Somoni', 154 | 'TMT' => 'Turkmenistan New Manat', 155 | 'TND' => 'Tunisian Dinar', 156 | 'TOP' => 'Pa’anga', 157 | 'TRY' => 'Turkish Lira', 158 | 'TTD' => 'Trinidad and Tobago Dollar', 159 | 'TWD' => 'New Taiwan Dollar', 160 | 'TZS' => 'Tanzanian Shilling', 161 | 'UAH' => 'Hryvnia', 162 | 'UGX' => 'Uganda Shilling', 163 | 'USD' => 'US Dollar', 164 | 'USN' => 'US Dollar (Next day)', 165 | 'UYI' => 'Uruguay Peso en Unidades Indexadas (URUIURUI)', 166 | 'UYU' => 'Peso Uruguayo', 167 | 'UZS' => 'Uzbekistan Sum', 168 | 'VEF' => 'Bolivar', 169 | 'VND' => 'Dong', 170 | 'VUV' => 'Vatu', 171 | 'WST' => 'Tala', 172 | 'XAF' => 'CFA Franc BEAC', 173 | 'XCD' => 'East Caribbean Dollar', 174 | 'XDR' => 'SDR (Special Drawing Right)', 175 | 'XOF' => 'CFA Franc BCEAO', 176 | 'XPF' => 'CFP Franc', 177 | 'XSU' => 'Sucre', 178 | 'XUA' => 'ADB Unit of Account', 179 | 'YER' => 'Yemeni Rial', 180 | 'ZAR' => 'Rand', 181 | 'ZMW' => 'Zambian Kwacha', 182 | 'ZWL' => 'Zimbabwe Dollar', 183 | ]; 184 | } 185 | -------------------------------------------------------------------------------- /src/Data/Currencies/CurrencyNumbers.php: -------------------------------------------------------------------------------- 1 | '971', 16 | 'ALL' => '8', 17 | 'DZD' => '12', 18 | 'USD' => '840', 19 | 'EUR' => '978', 20 | 'AOA' => '973', 21 | 'XCD' => '951', 22 | 'ARS' => '32', 23 | 'AMD' => '51', 24 | 'AWG' => '533', 25 | 'AUD' => '36', 26 | 'AZN' => '944', 27 | 'BSD' => '44', 28 | 'BHD' => '48', 29 | 'BDT' => '50', 30 | 'BBD' => '52', 31 | 'BYN' => '933', 32 | 'BZD' => '84', 33 | 'XOF' => '952', 34 | 'BMD' => '60', 35 | 'BTN' => '64', 36 | 'INR' => '356', 37 | 'BOB' => '68', 38 | 'BOV' => '984', 39 | 'BAM' => '977', 40 | 'BWP' => '72', 41 | 'NOK' => '578', 42 | 'BRL' => '986', 43 | 'BND' => '96', 44 | 'BGN' => '975', 45 | 'BIF' => '108', 46 | 'CVE' => '132', 47 | 'KHR' => '116', 48 | 'XAF' => '950', 49 | 'CAD' => '124', 50 | 'KYD' => '136', 51 | 'CLF' => '990', 52 | 'CLP' => '152', 53 | 'CNY' => '156', 54 | 'COP' => '170', 55 | 'COU' => '970', 56 | 'KMF' => '174', 57 | 'CDF' => '976', 58 | 'NZD' => '554', 59 | 'CRC' => '188', 60 | 'HRK' => '191', 61 | 'CUC' => '931', 62 | 'CUP' => '192', 63 | 'ANG' => '532', 64 | 'CZK' => '203', 65 | 'DKK' => '208', 66 | 'DJF' => '262', 67 | 'DOP' => '214', 68 | 'EGP' => '818', 69 | 'SVC' => '222', 70 | 'ERN' => '232', 71 | 'ETB' => '230', 72 | 'FKP' => '238', 73 | 'FJD' => '242', 74 | 'XPF' => '953', 75 | 'GMD' => '270', 76 | 'GEL' => '981', 77 | 'GHS' => '936', 78 | 'GIP' => '292', 79 | 'GTQ' => '320', 80 | 'GBP' => '826', 81 | 'GNF' => '324', 82 | 'GYD' => '328', 83 | 'HTG' => '332', 84 | 'HNL' => '340', 85 | 'HKD' => '344', 86 | 'HUF' => '348', 87 | 'ISK' => '352', 88 | 'IDR' => '360', 89 | 'XDR' => '960', 90 | 'IRR' => '364', 91 | 'IQD' => '368', 92 | 'ILS' => '376', 93 | 'JMD' => '388', 94 | 'JPY' => '392', 95 | 'JOD' => '400', 96 | 'KZT' => '398', 97 | 'KES' => '404', 98 | 'KPW' => '408', 99 | 'KRW' => '410', 100 | 'KWD' => '414', 101 | 'KGS' => '417', 102 | 'LAK' => '418', 103 | 'LBP' => '422', 104 | 'LSL' => '426', 105 | 'ZAR' => '710', 106 | 'LRD' => '430', 107 | 'LYD' => '434', 108 | 'CHF' => '756', 109 | 'MOP' => '446', 110 | 'MGA' => '969', 111 | 'MWK' => '454', 112 | 'MYR' => '458', 113 | 'MVR' => '462', 114 | 'MRU' => '929', 115 | 'MUR' => '480', 116 | 'XUA' => '965', 117 | 'MXN' => '484', 118 | 'MXV' => '979', 119 | 'MDL' => '498', 120 | 'MNT' => '496', 121 | 'MAD' => '504', 122 | 'MZN' => '943', 123 | 'MMK' => '104', 124 | 'NAD' => '516', 125 | 'NPR' => '524', 126 | 'NIO' => '558', 127 | 'NGN' => '566', 128 | 'OMR' => '512', 129 | 'PKR' => '586', 130 | 'PAB' => '590', 131 | 'PGK' => '598', 132 | 'PYG' => '600', 133 | 'PEN' => '604', 134 | 'PHP' => '608', 135 | 'PLN' => '985', 136 | 'QAR' => '634', 137 | 'MKD' => '807', 138 | 'RON' => '946', 139 | 'RUB' => '643', 140 | 'RWF' => '646', 141 | 'SHP' => '654', 142 | 'WST' => '882', 143 | 'STN' => '930', 144 | 'SAR' => '682', 145 | 'RSD' => '941', 146 | 'SCR' => '690', 147 | 'SLL' => '694', 148 | 'SGD' => '702', 149 | 'XSU' => '994', 150 | 'SBD' => '90', 151 | 'SOS' => '706', 152 | 'SSP' => '728', 153 | 'LKR' => '144', 154 | 'SDG' => '938', 155 | 'SRD' => '968', 156 | 'SZL' => '748', 157 | 'SEK' => '752', 158 | 'CHE' => '947', 159 | 'CHW' => '948', 160 | 'SYP' => '760', 161 | 'TWD' => '901', 162 | 'TJS' => '972', 163 | 'TZS' => '834', 164 | 'THB' => '764', 165 | 'TOP' => '776', 166 | 'TTD' => '780', 167 | 'TND' => '788', 168 | 'TRY' => '949', 169 | 'TMT' => '934', 170 | 'UGX' => '800', 171 | 'UAH' => '980', 172 | 'AED' => '784', 173 | 'USN' => '997', 174 | 'UYI' => '940', 175 | 'UYU' => '858', 176 | 'UZS' => '860', 177 | 'VUV' => '548', 178 | 'VEF' => '937', 179 | 'VND' => '704', 180 | 'YER' => '886', 181 | 'ZMW' => '967', 182 | 'ZWL' => '932', 183 | ]; 184 | } 185 | -------------------------------------------------------------------------------- /src/Data/ISODataBase.php: -------------------------------------------------------------------------------- 1 | db; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Data/Languages/LanguagesEN.php: -------------------------------------------------------------------------------- 1 | 'Afar', 16 | 'AB' => 'Abkhazian', 17 | 'AE' => 'Avestan', 18 | 'AF' => 'Afrikaans', 19 | 'AK' => 'Akan', 20 | 'AM' => 'Amharic', 21 | 'AN' => 'Aragonese', 22 | 'AR' => 'Arabic', 23 | 'AS' => 'Assamese', 24 | 'AV' => 'Avaric', 25 | 'AY' => 'Aymara', 26 | 'AZ' => 'Azerbaijani', 27 | 'BA' => 'Bashkir', 28 | 'BE' => 'Belarusian', 29 | 'BG' => 'Bulgarian', 30 | 'BH' => 'Bihari', 31 | 'BI' => 'Bislama', 32 | 'BM' => 'Bambara', 33 | 'BN' => 'Bengali', 34 | 'BO' => 'Tibetan', 35 | 'BR' => 'Breton', 36 | 'BS' => 'Bosnian', 37 | 'CA' => 'Catalan', 38 | 'CE' => 'Chechen', 39 | 'CH' => 'Chamorro', 40 | 'CO' => 'Corsican', 41 | 'CR' => 'Cree', 42 | 'CRS' => 'Seychellois Creole', 43 | 'CS' => 'Czech', 44 | 'CV' => 'Chuvash', 45 | 'CY' => 'Welsh', 46 | 'DA' => 'Danish', 47 | 'DE' => 'German', 48 | 'DV' => 'Maldivian', 49 | 'DZ' => 'Dzongkha', 50 | 'EE' => 'Ewe', 51 | 'EL' => 'Greek', 52 | 'EN' => 'English', 53 | 'EO' => 'Esperanto', 54 | 'ES' => 'Spanish', 55 | 'ET' => 'Estonian', 56 | 'EU' => 'Basque', 57 | 'FA' => 'Persian', 58 | 'FF' => 'Fulah', 59 | 'FI' => 'Finnish', 60 | 'FIL' => 'Filipino', 61 | 'FJ' => 'Fijian', 62 | 'FO' => 'Faroese', 63 | 'FR' => 'French', 64 | 'FY' => 'Western Frisian', 65 | 'GA' => 'Irish', 66 | 'GD' => 'Gaelic', 67 | 'GL' => 'Galician', 68 | 'GN' => 'Guarani', 69 | 'GU' => 'Gujarati', 70 | 'GV' => 'Manx', 71 | 'HA' => 'Hausa', 72 | 'HE' => 'Hebrew', 73 | 'HI' => 'Hindi', 74 | 'HO' => 'Hiri Motu', 75 | 'HR' => 'Croatian', 76 | 'HT' => 'Haitian', 77 | 'HU' => 'Hungarian', 78 | 'HY' => 'Armenian', 79 | 'HZ' => 'Herero', 80 | 'IA' => 'Interlingua', 81 | 'ID' => 'Indonesian', 82 | 'IE' => 'Interlingue', 83 | 'IG' => 'Igbo', 84 | 'II' => 'Sichuan Yi', 85 | 'IK' => 'Inupiaq', 86 | 'IO' => 'Ido', 87 | 'IS' => 'Icelandic', 88 | 'IT' => 'Italian', 89 | 'IU' => 'Inuktitut', 90 | 'JA' => 'Japanese', 91 | 'JV' => 'Javanese', 92 | 'KA' => 'Georgian', 93 | 'KCK' => 'Kalanga', 94 | 'KG' => 'Kongo', 95 | 'KI' => 'Kikuyu', 96 | 'KJ' => 'Kuanyama', 97 | 'KK' => 'Kazakh', 98 | 'KL' => 'Greenlandic', 99 | 'KM' => 'Central Khmer', 100 | 'KN' => 'Kannada', 101 | 'KO' => 'Korean', 102 | 'KR' => 'Kanuri', 103 | 'KS' => 'Kashmiri', 104 | 'KU' => 'Kurdish', 105 | 'KV' => 'Komi', 106 | 'KW' => 'Cornish', 107 | 'KY' => 'Kyrgyz', 108 | 'LA' => 'Latin', 109 | 'LB' => 'Luxembourgish', 110 | 'LG' => 'Ganda', 111 | 'LI' => 'Limburgan', 112 | 'LN' => 'Lingala', 113 | 'LO' => 'Lao', 114 | 'LT' => 'Lithuanian', 115 | 'LU' => 'Luba-Katanga', 116 | 'LV' => 'Latvian', 117 | 'MG' => 'Malagasy', 118 | 'MH' => 'Marshallese', 119 | 'MI' => 'Maori', 120 | 'MK' => 'Macedonian', 121 | 'ML' => 'Malayalam', 122 | 'MN' => 'Mongolian', 123 | 'MR' => 'Marathi', 124 | 'MS' => 'Malay', 125 | 'MT' => 'Maltese', 126 | 'MY' => 'Burmese', 127 | 'NA' => 'Nauru', 128 | 'NB' => 'Norwegian Bokmå', 129 | 'ND' => 'North Ndebele', 130 | 'NE' => 'Nepali', 131 | 'NG' => 'Ndonga', 132 | 'NL' => 'Dutch', 133 | 'NN' => 'Nynorsk, Norwegian', 134 | 'NO' => 'Norwegian', 135 | 'NR' => 'South Ndebele', 136 | 'NV' => 'Navajo', 137 | 'NY' => 'Nyanja', 138 | 'OC' => 'Occitan', 139 | 'OJ' => 'Ojibwa', 140 | 'OM' => 'Oromo', 141 | 'OR' => 'Oriya', 142 | 'OS' => 'Ossetian', 143 | 'PA' => 'Punjabi', 144 | 'PI' => 'Pali', 145 | 'PIH' => 'Pitkern', 146 | 'PL' => 'Polish', 147 | 'PS' => 'Pashto', 148 | 'PT' => 'Portuguese', 149 | 'QU' => 'Quechua', 150 | 'RM' => 'Romansh', 151 | 'RN' => 'Rundi', 152 | 'RO' => 'Romanian', 153 | 'RU' => 'Russian', 154 | 'RW' => 'Kinyarwanda', 155 | 'SA' => 'Sanskrit', 156 | 'SC' => 'Sardinian', 157 | 'SD' => 'Sindhi', 158 | 'SE' => 'Northern Sami', 159 | 'SG' => 'Sango', 160 | 'SI' => 'Sinhala', 161 | 'SK' => 'Slovak', 162 | 'SL' => 'Slovenian', 163 | 'SM' => 'Samoan', 164 | 'SN' => 'Shona', 165 | 'SO' => 'Somali', 166 | 'SQ' => 'Albanian', 167 | 'SR' => 'Serbian', 168 | 'SS' => 'Swati', 169 | 'ST' => 'Sotho', 170 | 'SU' => 'Sundanese', 171 | 'SV' => 'Swedish', 172 | 'SW' => 'Swahili', 173 | 'TA' => 'Tamil', 174 | 'TE' => 'Telugu', 175 | 'TDT' => 'Tetun Dili', 176 | 'TG' => 'Tajik', 177 | 'TH' => 'Thai', 178 | 'TI' => 'Tigrinya', 179 | 'TK' => 'Turkmen', 180 | 'TL' => 'Tagalog', 181 | 'TN' => 'Tswana', 182 | 'TO' => 'Tonga', 183 | 'TKL' => 'Tokelauan', 184 | 'TR' => 'Turkish', 185 | 'TS' => 'Tsonga', 186 | 'TT' => 'Tatar', 187 | 'TVL' => 'Tuvaluan', 188 | 'TW' => 'Twi', 189 | 'TY' => 'Tahitian', 190 | 'UG' => 'Uighur', 191 | 'UK' => 'Ukrainian', 192 | 'UR' => 'Urdu', 193 | 'UZ' => 'Uzbek', 194 | 'VE' => 'Venda', 195 | 'VI' => 'Vietnamese', 196 | 'VO' => 'Volapük', 197 | 'WA' => 'Walloon', 198 | 'WO' => 'Wolof', 199 | 'XH' => 'Xhosa', 200 | 'YI' => 'Yiddish', 201 | 'YO' => 'Yoruba', 202 | 'ZA' => 'Zhuang', 203 | 'ZH' => 'Chinese', 204 | 'ZU' => 'Zulu', 205 | ]; 206 | } 207 | -------------------------------------------------------------------------------- /src/Enums/NodeResolution.php: -------------------------------------------------------------------------------- 1 | \Juanparati\ISOCodes\Data\Countries\CountryCodes::class, 29 | 'countries' => \Juanparati\ISOCodes\Data\Countries\CountriesEN::class, 30 | 'currencies' => \Juanparati\ISOCodes\Data\Currencies\CurrenciesEN::class, 31 | 'currencyNumbers'=> \Juanparati\ISOCodes\Data\Currencies\CurrencyNumbers::class, 32 | 'languages' => \Juanparati\ISOCodes\Data\Languages\LanguagesEN::class, 33 | 'continents' => \Juanparati\ISOCodes\Data\Continents\ContinentsEN::class, 34 | ]; 35 | 36 | 37 | /** 38 | * Default resolutions. 39 | * 40 | * @var array 41 | */ 42 | protected array $defaultResolutions = [ 43 | 'currencies' => NodeResolution::NODE_AS_CODE, 44 | 'continents' => NodeResolution::NODE_AS_CODE, 45 | 'languages' => NodeResolution::NODE_AS_CODE, 46 | ]; 47 | 48 | 49 | /** 50 | * Default options. 51 | * 52 | * @var array|false[] 53 | */ 54 | protected array $defaultOptions = [ 55 | 'currencyAsNumber' => false 56 | ]; 57 | 58 | 59 | /** 60 | * Loaded models. 61 | * 62 | * @var ISOModelContract[] 63 | */ 64 | protected array $modelInstances = []; 65 | 66 | 67 | /** 68 | * Loaded databases. 69 | * 70 | * @var ISODataContract[] 71 | */ 72 | protected array $databaseInstances = []; 73 | 74 | 75 | /** 76 | * Constructor. 77 | * 78 | * @param array $datasets 79 | * @param array $defaultResolutions 80 | * @param array $defaultOptions 81 | */ 82 | public function __construct( 83 | array $datasets = [], 84 | array $defaultResolutions = [], 85 | array $defaultOptions = [], 86 | ) 87 | { 88 | $this->datasets = array_merge($this->datasets, $datasets); 89 | $this->defaultResolutions = array_merge($this->defaultResolutions, $defaultResolutions); 90 | $this->defaultOptions = array_merge($this->defaultOptions, $defaultOptions); 91 | } 92 | 93 | 94 | /** 95 | * Call an ISO model. 96 | * 97 | * @param string $name 98 | * @param array $args 99 | * @return ISOModelContract 100 | * @throws ISOModelNotFound 101 | */ 102 | public function __call(string $name, array $args) 103 | { 104 | $model = '\\Juanparati\\ISOCodes\\Models\\' . ucfirst(Pluralizer::singular($name)) . 'Model'; 105 | 106 | if (!isset($this->modelInstances[$model])) { 107 | if (class_exists($model)) { 108 | $this->modelInstances[$model] = new $model($this); 109 | } else { 110 | throw new ISOModelNotFound($model . ' not found'); 111 | } 112 | } 113 | 114 | 115 | foreach ($this->defaultResolutions as $node => $resolution) { 116 | $this->modelInstances[$model]->setResolution($node, $resolution); 117 | } 118 | 119 | return $this->modelInstances[$model] 120 | ->setCurrencyAsNumber($this->defaultOptions['currencyAsNumber'] ?? false); 121 | } 122 | 123 | 124 | /** 125 | * Return the list of loaded databases. 126 | * 127 | * @param string 128 | * @return ISODataContract 129 | */ 130 | public function getDatabaseInstance(string $key): ISODataContract 131 | { 132 | if (!isset($this->databaseInstances[$key])) { 133 | $this->databaseInstances[$key] = new $this->datasets[$key](); 134 | } 135 | 136 | return $this->databaseInstances[$key]; 137 | } 138 | } 139 | -------------------------------------------------------------------------------- /src/Models/BasicModelBase.php: -------------------------------------------------------------------------------- 1 | NodeResolution::NODE_AS_CODE, 27 | 'continents' => NodeResolution::NODE_AS_CODE, 28 | 'languages' => NodeResolution::NODE_AS_CODE, 29 | ]; 30 | 31 | 32 | /** 33 | * Cache. 34 | * 35 | * @var Collection[] 36 | */ 37 | protected array $cache = []; 38 | 39 | 40 | /** 41 | * Model options. 42 | * 43 | * @var array 44 | */ 45 | protected array $options = [ 46 | 'currencyAsNumber' => false 47 | ]; 48 | 49 | 50 | /** 51 | * Constructor. 52 | * 53 | * @param ISOCodes $iso 54 | */ 55 | public function __construct(protected ISOCodes $iso) {} 56 | 57 | 58 | /** 59 | * Define when the currency is returned as number instead of code. 60 | * 61 | * @param bool $state 62 | * @return $this 63 | */ 64 | public function setCurrencyAsNumber(bool $state): static 65 | { 66 | $this->options['currencyAsNumber'] = $state; 67 | return $this; 68 | } 69 | 70 | 71 | /** 72 | * Set the node resolution. 73 | * 74 | * @param string $node 75 | * @param NodeResolution $format 76 | * @return $this 77 | * @throws ISONodeAttributeMissing 78 | */ 79 | public function setResolution(string $node, NodeResolution $format = NodeResolution::NODE_AS_CODE): static 80 | { 81 | if (!isset($this->nodeResolution[$node])) { 82 | throw new ISONodeAttributeMissing('Node attribute is missing'); 83 | } 84 | 85 | if ($this->nodeResolution[$node] !== $format) { 86 | $this->nodeResolution[$node] = $format; 87 | $this->cache = []; 88 | } 89 | 90 | return $this; 91 | } 92 | 93 | /** 94 | * Get options. 95 | * 96 | * @return array|false[] 97 | */ 98 | public function getOptions(): array 99 | { 100 | return $this->options; 101 | } 102 | 103 | 104 | /** 105 | * Set options. 106 | * 107 | * @param array $options 108 | * @return $this 109 | */ 110 | public function setOptions(array $options): static 111 | { 112 | $this->options = $options; 113 | 114 | return $this; 115 | } 116 | 117 | 118 | /** 119 | * Clone current model. 120 | * 121 | * @return $this 122 | */ 123 | public function clone() : static 124 | { 125 | return clone $this; 126 | } 127 | 128 | 129 | /** 130 | * Resolve node data. 131 | * 132 | * @param string $node 133 | * @param Collection $modelData 134 | * @param array $codes 135 | * @return array 136 | */ 137 | protected function resolveNodeData( 138 | string $node, 139 | Collection $modelData, 140 | array $codes, 141 | ): ?array { 142 | if ($this->nodeResolution[$node] === NodeResolution::NODE_AS_NONE) { 143 | return null; 144 | } 145 | 146 | $list = []; 147 | 148 | foreach ($codes as $code) { 149 | if ($this->nodeResolution[$node] === NodeResolution::NODE_AS_CODE) { 150 | $list[] = $code; 151 | } elseif ($this->nodeResolution[$node] === NodeResolution::NODE_AS_NAME) { 152 | $list[] = $modelData[$code] ?? null; 153 | } else { 154 | $list[$code] = $modelData[$code] ?? null; 155 | } 156 | } 157 | 158 | return $list; 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /src/Models/ContinentModel.php: -------------------------------------------------------------------------------- 1 | all() 27 | ->firstWhere('alpha2', strtoupper($alpha2)); 28 | } 29 | 30 | 31 | /** 32 | * Search by Alpha3. 33 | * 34 | * @param string $alpha3 35 | * @return array|null 36 | */ 37 | public function findByAlpha3(string $alpha3): ?ModelRecord 38 | { 39 | return $this->all() 40 | ->firstWhere('alpha3', strtoupper($alpha3)); 41 | } 42 | 43 | 44 | /** 45 | * Search by number. 46 | * 47 | * @param $number 48 | * @return array|null 49 | */ 50 | public function findByNumeric($number): ?ModelRecord 51 | { 52 | return $this->all() 53 | ->firstWhere('numeric', $number); 54 | } 55 | 56 | 57 | /** 58 | * Search by TLD. 59 | * 60 | * @param string $tld 61 | * @return array|null 62 | */ 63 | public function findByTld(string $tld): ?ModelRecord 64 | { 65 | $tld = Str::of($tld) 66 | ->start('.') 67 | ->lower(); 68 | 69 | return $this->all() 70 | ->firstWhere('tld', $tld); 71 | } 72 | 73 | 74 | /** 75 | * Search by name (Case insensitive). 76 | * 77 | * @param string $name 78 | * @return array|null 79 | */ 80 | public function findByName(string $name): ?ModelRecord 81 | { 82 | $name = (string) Str::of($name) 83 | ->lower() 84 | ->trim(); 85 | 86 | return $this->all() 87 | ->filter(fn($country) => $name === Str::lower($country['name'])) 88 | ->first(); 89 | } 90 | 91 | 92 | /** 93 | * Search by phone code. 94 | * 95 | * @param $code 96 | * @return array|null 97 | */ 98 | public function findByPhoneCode($code) : ?ModelRecord 99 | { 100 | $code = is_string($code) ? ('+' === $code[0] ? substr($code, 1) : $code) : $code; 101 | 102 | return $this->all() 103 | ->firstWhere('phone_code', $code); 104 | } 105 | 106 | /** 107 | * Search by language. 108 | * 109 | * @param string|array $language 110 | * @param bool $exact 111 | * @return Collection|null 112 | */ 113 | public function whereLanguage(string|array $language, bool $exact = false) : ?Collection 114 | { 115 | return $this->whereNodeHas('languages', $language, $exact); 116 | } 117 | 118 | 119 | /** 120 | * Search by currency. 121 | * 122 | * @param string|array $currency 123 | * @param bool $exact 124 | * @return Collection|null 125 | */ 126 | public function whereCurrency(string|array $currency, bool $exact = false) : ?Collection 127 | { 128 | return $this->whereNodeHas('currencies', $currency, $exact); 129 | } 130 | 131 | 132 | /** 133 | * Search by continent. 134 | * 135 | * @param string|array $continent 136 | * @param bool $exact 137 | * @return Collection|null 138 | */ 139 | public function whereContinent(string|array $continent, bool $exact = false) : ?Collection 140 | { 141 | return $this->whereNodeHas('continents', $continent, $exact); 142 | } 143 | 144 | 145 | /** 146 | * Return the list of all country codes with their nodes. 147 | * 148 | * @param bool $asArray 149 | * @return Collection 150 | */ 151 | public function all(bool $asArray = false): Collection 152 | { 153 | $nodeData = [ 154 | 'languages' => $this->iso->languages()->list(), 155 | 'continents' => $this->iso->continents()->list(), 156 | 'currencies' => $this->iso->currencies()->list() 157 | ]; 158 | 159 | $currencyNumbers = $this->iso->currencyNumbers()->list(); 160 | 161 | return $this->list()->map(function ($country) use ($nodeData, $currencyNumbers, $asArray) { 162 | foreach (array_keys($this->nodeResolution) as $nodeName) { 163 | if (isset($country[$nodeName])) { 164 | $data = $this->resolveNodeData( 165 | $nodeName, 166 | $nodeData[$nodeName], 167 | $country[$nodeName] 168 | ); 169 | 170 | if ($data === null) { 171 | unset($country[$nodeName]); 172 | } else { 173 | if ($this->options['currencyAsNumber'] && $nodeName === 'currencies') { 174 | $data = match ($this->nodeResolution['currencies']) { 175 | NodeResolution::NODE_AS_CODE => array_map(fn ($cur) => (string) $currencyNumbers[$cur], $data), 176 | NodeResolution::NODE_AS_ALL => collect($data)->mapWithKeys(fn ($name, $cur) => [(string) $currencyNumbers[$cur] => $name])->toArray(), 177 | }; 178 | } 179 | 180 | $country[$nodeName] = $data; 181 | } 182 | } 183 | } 184 | 185 | return $asArray ? $country : new ModelRecord($country); 186 | }); 187 | } 188 | 189 | 190 | /** 191 | * Return the raw list. 192 | * 193 | * @return Collection 194 | */ 195 | public function list(): Collection 196 | { 197 | $countryNames = $this->iso->getDatabaseInstance('countries')->all(); 198 | 199 | return collect($this->iso->getDatabaseInstance('countryCodes')->all()) 200 | ->map(function ($country, $code) use ($countryNames) { 201 | $country['name'] = $countryNames[$code]; 202 | return $country; 203 | }); 204 | } 205 | 206 | 207 | public function toArray() : array { 208 | return $this 209 | ->all(true) 210 | ->toArray(); 211 | } 212 | } 213 | -------------------------------------------------------------------------------- /src/Models/CurrencyModel.php: -------------------------------------------------------------------------------- 1 | iso->countries()->setCurrencyAsNumber(true); 27 | 28 | foreach ($this->nodeResolution as $nodeName => $nodeFormat) { 29 | $countries->setResolution($nodeName, $nodeFormat); 30 | } 31 | 32 | $list = $this->list(); 33 | $list = $this->iso->currencies() 34 | ->list() 35 | ->mapWithKeys(fn ($cur, $key) => [$list[$key] => $cur]); 36 | 37 | return $countries->all() 38 | ->groupBy('currencies') 39 | ->map(function ($cur, $code) use ($list, $asArray) { 40 | $base = [ 41 | 'code' => (string) $code, 42 | 'name' => $list[$code] ?? null, 43 | 'countries' => $cur, 44 | ]; 45 | 46 | foreach ($this->assocNodes as $assocNode) { 47 | $base[$assocNode] = $cur->pluck($assocNode)->filter()->collapse()->unique(); 48 | } 49 | 50 | return $asArray ? $base : new ModelRecord($base); 51 | }); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/Models/Extensions/CollectionMethodCallable.php: -------------------------------------------------------------------------------- 1 | all(); 22 | return call_user_func_array([$all, $method], $parameters); 23 | } 24 | 25 | return parent::__call($method, $parameters); 26 | } 27 | } -------------------------------------------------------------------------------- /src/Models/Extensions/NodeSearchable.php: -------------------------------------------------------------------------------- 1 | all(); 24 | 25 | if ($exact) { 26 | return $qry->filter( 27 | fn($iso) => empty(array_diff($search, $iso[$node])) 28 | ); 29 | } 30 | 31 | return $qry->filter( 32 | fn($iso) => !empty(array_intersect($search, $iso[$node])) 33 | ); 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /src/Models/LanguageModel.php: -------------------------------------------------------------------------------- 1 | all() 50 | ->where('code', strtoupper($code)) 51 | ->first(); 52 | } 53 | 54 | 55 | /** 56 | * Return the list of all. 57 | * 58 | * @param bool $asArray 59 | * @return Collection 60 | * @throws ISONodeAttributeMissing 61 | */ 62 | public function all(bool $asArray = false): Collection 63 | { 64 | $countries = $this->iso->countries()->setOptions($this->options); 65 | 66 | foreach ($this->nodeResolution as $nodeName => $nodeFormat) { 67 | $countries->setResolution($nodeName, $nodeFormat); 68 | } 69 | 70 | $list = $this->list(); 71 | 72 | return $countries->all() 73 | ->groupBy($this->database) 74 | ->map(function ($cur, $code) use ($list, $asArray) { 75 | $base = [ 76 | 'code' => $code, 77 | 'name' => $list[$code] ?? null, 78 | 'countries' => $asArray ? $cur->map(fn($c) => $c->toArray())->toArray() : $cur, 79 | ]; 80 | 81 | foreach ($this->assocNodes as $assocNode) { 82 | $base[$assocNode] = $cur 83 | ->pluck($assocNode) 84 | ->filter() 85 | ->collapse() 86 | ->unique(); 87 | 88 | if ($asArray) 89 | $base[$assocNode] = $base[$assocNode]->toArray(); 90 | } 91 | 92 | return $asArray ? $base : new ModelRecord($base); 93 | }); 94 | } 95 | 96 | 97 | public function toArray() : array { 98 | return $this 99 | ->all(true) 100 | ->toArray(); 101 | } 102 | 103 | 104 | /** 105 | * Return the raw list. 106 | * 107 | * @return Collection 108 | */ 109 | public function list(): Collection 110 | { 111 | return collect($this->iso->getDatabaseInstance($this->database)->all()); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /src/Models/ModelRecord.php: -------------------------------------------------------------------------------- 1 | record); 21 | } 22 | 23 | public function offsetGet(mixed $offset) : mixed 24 | { 25 | return $this->record[strtolower($offset)] ?? null; 26 | } 27 | 28 | public function offsetSet(mixed $offset, mixed $value) : void 29 | { 30 | throw new ISORecordReadOnlyException("Attribute $offset is read-only"); 31 | } 32 | 33 | public function offsetUnset(mixed $offset) : void 34 | { 35 | throw new ISORecordReadOnlyException("Attribute $offset is cannot be removed"); 36 | } 37 | 38 | /** 39 | * Getter. 40 | * 41 | * @param string $attr 42 | * @return mixed 43 | * @throws ISORecordAttributeNotFound 44 | */ 45 | public function __get(string $attr) : mixed { 46 | if (!$this->offsetExists($attr)) 47 | throw new ISORecordAttributeNotFound("Attribute $attr is missing"); 48 | 49 | return $this->offsetGet($attr); 50 | } 51 | 52 | public function __serialize() : array 53 | { 54 | return $this->record; 55 | } 56 | 57 | public function __unserialize(array $data) : void 58 | { 59 | $this->record = $data; 60 | } 61 | 62 | public function jsonSerialize() : array 63 | { 64 | return $this->record; 65 | } 66 | 67 | /** 68 | * Encode record as JSON. 69 | * 70 | * @param int $flags 71 | * @return string 72 | */ 73 | public function toJson(int $flags = 0) : string { 74 | return json_encode($this->record, $flags); 75 | } 76 | 77 | /** 78 | * Encode record as array. 79 | * 80 | * @return array 81 | */ 82 | public function toArray() : array { 83 | return $this->record; 84 | } 85 | } -------------------------------------------------------------------------------- /src/Providers/ISOCodesProvider.php: -------------------------------------------------------------------------------- 1 | publishes([ 18 | __DIR__ . '/../../config/isocodes.php' => $this->app->configPath('isocodes.php'), 19 | ]); 20 | } 21 | 22 | 23 | public function register() 24 | { 25 | $this->mergeConfigFrom(__DIR__ . '/../../config/isocodes.php', 'isocodes'); 26 | 27 | $this->app->singleton(ISOCodes::class, function () { 28 | $config = $this->app['config']['isocodes'] ?? []; 29 | return new ISOCodes( 30 | $config['datasets'] ?? [], 31 | $config['resolutions'] ?? [], 32 | $config['options'] ?? [] 33 | ); 34 | }); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /tests/test/CollectionCallableTest.php: -------------------------------------------------------------------------------- 1 | assertNotEmpty($iso->countries()->first()); 16 | $this->assertEquals(1, $iso->countries()->where('name', 'Spain')->count()); 17 | $this->assertEquals(1, $iso->currencies()->where(fn($c) => $c->code === 'BBD')->count()); 18 | } 19 | 20 | 21 | public function testMacroable() { 22 | \Juanparati\ISOCodes\Models\CountryModel::macro('allEUMembers', function () { 23 | return $this->where('eu_member', true)->all(); 24 | }); 25 | 26 | $iso = new ISOCodes(); 27 | 28 | $euMembers = $iso->countries()->allEUMembers(); 29 | $this->assertCount(27, $euMembers); 30 | 31 | // GB leave us 😢 32 | $this->assertTrue($iso->countries()->where('eu_member', false)->contains(fn($c) => $c->alpha2 === 'GB')); 33 | } 34 | 35 | } -------------------------------------------------------------------------------- /tests/test/ContinentsTest.php: -------------------------------------------------------------------------------- 1 | continents()->all(); 14 | $this->assertEquals(7, $cont->count()); 15 | } 16 | 17 | 18 | public function testContinentCode() { 19 | $iso = new ISOCodes(); 20 | $cont = $iso->continents()->findByCode('EU'); 21 | 22 | $this->assertArrayHasKey('countries', $cont); 23 | $this->assertArrayHasKey('languages', $cont); 24 | $this->assertArrayHasKey('currencies', $cont); 25 | 26 | $this->assertGreaterThan(20, $cont['countries']->count()); 27 | $this->assertGreaterThan(20, $cont['languages']->count()); 28 | $this->assertGreaterThan(20, $cont['currencies']->count()); 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /tests/test/CountriesTest.php: -------------------------------------------------------------------------------- 1 | 'Spain', 17 | 'alpha2' => 'ES', 18 | 'alpha3' => 'ESP', 19 | 'numeric' => '724', 20 | 'tld' => '.es', 21 | 'timezones' => [ 22 | 'Europe/Madrid', 23 | 'Africa/Ceuta', 24 | 'Atlantic/Canary' 25 | ] 26 | ]; 27 | 28 | protected array $testNodeCode = [ 29 | 'currencies' => ['EUR'], 30 | 'languages' => ['ES', 'CA', 'GL', 'EU'], 31 | 'continents' => ['EU'], 32 | ]; 33 | 34 | protected array $testNodeAll = [ 35 | 'currencies' => [ 36 | 'EUR' => 'Euro' 37 | ], 38 | 'languages' => [ 39 | 'ES' => 'Spanish', 40 | 'CA' => 'Catalan', 41 | 'GL' => 'Galician', 42 | 'EU' => 'Basque' 43 | ], 44 | 'continents' => [ 45 | 'EU' => 'Europe' 46 | ] 47 | ]; 48 | 49 | protected array $testNodeName = [ 50 | 'currencies' => [ 51 | 'Euro' 52 | ], 53 | 'languages' => [ 54 | 'Spanish', 55 | 'Catalan', 56 | 'Galician', 57 | 'Basque' 58 | ], 59 | 'continents' => [ 60 | 'Europe' 61 | ] 62 | ]; 63 | 64 | 65 | /** 66 | * Test retrieving all countries. 67 | */ 68 | public function testAllCountries() { 69 | 70 | $iso = new ISOCodes(); 71 | 72 | /** 73 | * @var Collection $countries 74 | */ 75 | $countries = $iso->countries()->all(); 76 | 77 | $this->assertGreaterThan(100, $countries->count()); 78 | 79 | foreach ($countries as $country) { 80 | $this->assertArrayHasKey('alpha2', $country); 81 | $this->assertArrayHasKey('alpha3', $country); 82 | $this->assertArrayHasKey('tld', $country); 83 | $this->assertArrayHasKey('currencies', $country); 84 | $this->assertArrayHasKey('continents', $country); 85 | $this->assertArrayHasKey('name', $country); 86 | $this->assertArrayHasKey('timezones', $country); 87 | } 88 | } 89 | 90 | 91 | /** 92 | * Test by Alpha2. 93 | */ 94 | public function testByAlpha2() { 95 | $iso = new ISOCodes(); 96 | 97 | $country = $iso->countries()->findByAlpha2('foo'); 98 | $this->assertNull($country); 99 | 100 | $country = $iso->countries()->findByAlpha2('es'); 101 | 102 | $this->assertCountry($this->testNodeCode + $this->testCountry, $country); 103 | 104 | $country = $iso->countries() 105 | ->setResolution('currencies', NodeResolution::NODE_AS_ALL) 106 | ->setResolution('continents', NodeResolution::NODE_AS_ALL) 107 | ->setResolution('languages' , NodeResolution::NODE_AS_ALL) 108 | ->findByAlpha2('es'); 109 | 110 | $this->assertCountry($this->testNodeAll + $this->testCountry, $country); 111 | 112 | $country = $iso->countries() 113 | ->setResolution('currencies', NodeResolution::NODE_AS_NAME) 114 | ->setResolution('continents', NodeResolution::NODE_AS_NAME) 115 | ->setResolution('languages' , NodeResolution::NODE_AS_NAME) 116 | ->findByAlpha2('es'); 117 | 118 | $this->assertCountry($this->testNodeName + $this->testCountry, $country); 119 | 120 | $country = $iso->countries() 121 | ->setResolution('currencies', NodeResolution::NODE_AS_NONE) 122 | ->setResolution('continents', NodeResolution::NODE_AS_NONE) 123 | ->setResolution('languages' , NodeResolution::NODE_AS_NONE) 124 | ->findByAlpha2('es'); 125 | 126 | $this->assertArrayNotHasKey('countries', $country); 127 | $this->assertArrayNotHasKey('currencies', $country); 128 | $this->assertArrayNotHasKey('continents', $country); 129 | $this->assertCountry($this->testCountry, $country); 130 | } 131 | 132 | 133 | /** 134 | * Test by Alpha3. 135 | */ 136 | public function testByAlpha3() { 137 | $iso = new ISOCodes(); 138 | 139 | $country = $iso->countries()->findByAlpha3('esp'); 140 | 141 | $this->assertCountry($this->testNodeCode + $this->testCountry, $country); 142 | } 143 | 144 | 145 | /** 146 | * Test search by Numeric. 147 | */ 148 | public function testByNumberic() { 149 | $iso = new ISOCodes(); 150 | 151 | $country = $iso->countries()->findByNumeric('724'); 152 | 153 | $this->assertCountry($this->testNodeCode + $this->testCountry, $country); 154 | } 155 | 156 | 157 | /** 158 | * Test search by TLD. 159 | */ 160 | public function testByTld() { 161 | $iso = new ISOCodes(); 162 | 163 | $country = $iso->countries()->findByTld('ES'); 164 | $this->assertCountry($this->testNodeCode + $this->testCountry, $country); 165 | 166 | $country = $iso->countries()->findByTld('.es'); 167 | $this->assertCountry($this->testNodeCode + $this->testCountry, $country); 168 | } 169 | 170 | 171 | /** 172 | * Test search by Name. 173 | * 174 | * @return void 175 | */ 176 | public function testByName() { 177 | $iso = new ISOCodes(); 178 | 179 | $country = $iso->countries()->findByName('spain'); 180 | $this->assertCountry($this->testNodeCode + $this->testCountry, $country); 181 | 182 | $country = $iso->countries()->findByName('spAIn'); 183 | $this->assertCountry($this->testNodeCode + $this->testCountry, $country); 184 | 185 | $country = $iso->countries()->findByName('Lalandia'); 186 | $this->assertNull($country); 187 | } 188 | 189 | 190 | /** 191 | * Test currency as number. 192 | */ 193 | public function testCurrencyAsNumber() { 194 | $iso = new ISOCodes(); 195 | 196 | $country = $iso->countries() 197 | ->setCurrencyAsNumber(true) 198 | ->findByAlpha2('es'); 199 | 200 | $this->assertEquals($country['currencies'], ['978']); 201 | 202 | $country = $iso->countries() 203 | ->setCurrencyAsNumber(true) 204 | ->setResolution('currencies', NodeResolution::NODE_AS_ALL) 205 | ->findByAlpha2('es'); 206 | 207 | $this->assertEquals($country['currencies'], ['978' => 'Euro']); 208 | } 209 | 210 | 211 | /** 212 | * Test continent search. 213 | * 214 | * @return void 215 | */ 216 | public function testContinentSearch() { 217 | $this->assertCount(2, (new ISOCodes())->countries()->whereContinent(['AS', 'EU'], true)); 218 | } 219 | 220 | 221 | /** 222 | * Test that main timezones are correct. 223 | * 224 | * @return void 225 | */ 226 | public function testMainTimezone() { 227 | $iso = new ISOCodes(); 228 | $countryCodes = new CountryCodes(); 229 | 230 | $reflectedClass = new \ReflectionClass($countryCodes); 231 | $reflection = $reflectedClass->getProperty('mainTimezones'); 232 | $mainTimezones = $reflection->getValue($countryCodes); 233 | 234 | foreach ($mainTimezones as $alpha2 => $timezone) { 235 | $timezones = $iso->countries()->findByAlpha2($alpha2)->timezones; 236 | $this->assertEquals($timezone, $timezones[0]); 237 | } 238 | } 239 | 240 | 241 | /** 242 | * Assert expected country. 243 | * 244 | * @param array $expected 245 | * @param \ArrayAccess|ModelRecord $country 246 | */ 247 | protected function assertCountry(array $expected, \ArrayAccess|ModelRecord $country) { 248 | foreach ($expected as $key => $value) 249 | $this->assertEquals($country[$key], $value); 250 | } 251 | 252 | } 253 | -------------------------------------------------------------------------------- /tests/test/CurrenciesTest.php: -------------------------------------------------------------------------------- 1 | currencies()->all(); 14 | $this->assertGreaterThan(100, $cont->count()); 15 | } 16 | 17 | 18 | public function testByCurrencyCode() { 19 | $iso = new ISOCodes(); 20 | $cont = $iso->currencies()->findByCode('EUR'); 21 | 22 | $this->assertArrayHasKey('countries', $cont); 23 | $this->assertArrayHasKey('languages', $cont); 24 | $this->assertArrayHasKey('continents', $cont); 25 | 26 | $this->assertGreaterThan(20, $cont['countries']->count()); 27 | $this->assertGreaterThan(20, $cont['languages']->count()); 28 | $this->assertGreaterThan(2, $cont['continents']->count()); 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /tests/test/CurrencyNumbersTest.php: -------------------------------------------------------------------------------- 1 | currencyNumbers()->all(); 14 | 15 | $this->assertGreaterThan(100, $cont->count()); 16 | 17 | foreach ($cont as $group) { 18 | $this->assertTrue(ctype_digit($group['code'])); 19 | $this->assertFalse(ctype_digit($group['name'])); 20 | } 21 | } 22 | 23 | 24 | public function testByCurrencyCode() { 25 | $iso = new ISOCodes(); 26 | $cont = $iso->currencyNumbers()->findByCode('978'); 27 | 28 | $this->assertArrayHasKey('countries', $cont); 29 | $this->assertArrayHasKey('languages', $cont); 30 | $this->assertArrayHasKey('continents', $cont); 31 | 32 | $this->assertGreaterThan(20, $cont['countries']->count()); 33 | $this->assertGreaterThan(20, $cont['languages']->count()); 34 | $this->assertGreaterThan(2, $cont['continents']->count()); 35 | } 36 | 37 | } -------------------------------------------------------------------------------- /tests/test/ImmutabilityTest.php: -------------------------------------------------------------------------------- 1 | countries() 22 | ->setResolution('currencies', NodeResolution::NODE_AS_ALL) 23 | ->setResolution('continents', NodeResolution::NODE_AS_ALL) 24 | ->setResolution('languages', NodeResolution::NODE_AS_ALL) 25 | ->findByAlpha2('de'); 26 | 27 | $original = $iso->countries()->findByAlpha2('de'); 28 | 29 | $this->assertNotEquals($original->currencies, $modified->currencies); 30 | $this->assertNotEquals($original->continents, $modified->continents); 31 | $this->assertNotEquals($original->languages, $modified->languages); 32 | 33 | $modified = $iso->countries() 34 | ->setResolution('currencies', NodeResolution::NODE_AS_NONE) 35 | ->setResolution('continents', NodeResolution::NODE_AS_NONE) 36 | ->setResolution('languages', NodeResolution::NODE_AS_NONE) 37 | ->findByAlpha2('de') 38 | ->toArray(); 39 | 40 | 41 | $this->assertFalse(isset($modified['currencies'])); 42 | $this->assertFalse(isset($modified['continents'])); 43 | $this->assertFalse(isset($modified['languages'])); 44 | 45 | $modified = $iso->countries() 46 | ->findByAlpha2('de') 47 | ->toArray(); 48 | 49 | $this->assertTrue(isset($modified['currencies'])); 50 | $this->assertTrue(isset($modified['continents'])); 51 | $this->assertTrue(isset($modified['languages'])); 52 | } 53 | 54 | 55 | /** 56 | * Test mutability on cloned models. 57 | */ 58 | public function testMutableClone() { 59 | $iso = new ISOCodes(defaultResolutions: [ 60 | 'currencies' => NodeResolution::NODE_AS_NAME 61 | ]); 62 | 63 | $currencies = $iso->currencies() 64 | ->all() 65 | ->toArray(); 66 | 67 | $this->assertArrayHasKey('Afghani', $currencies); 68 | 69 | $cloned = $iso->currencies() 70 | ->setResolution('currencies', NodeResolution::NODE_AS_CODE) 71 | ->clone(); 72 | 73 | $currencies = $cloned 74 | ->all() 75 | ->toArray(); 76 | 77 | $this->assertArrayHasKey('AFN', $currencies); 78 | } 79 | 80 | } -------------------------------------------------------------------------------- /tests/test/LanguagesTest.php: -------------------------------------------------------------------------------- 1 | languages()->all(); 14 | 15 | $this->assertGreaterThan(40, $cont->count()); 16 | } 17 | 18 | 19 | public function testByLanguageCode() { 20 | $iso = new ISOCodes(); 21 | 22 | $cont = $iso->languages()->findByCode('ES'); 23 | 24 | $this->assertArrayHasKey('countries', $cont); 25 | $this->assertArrayHasKey('currencies', $cont); 26 | $this->assertArrayHasKey('continents', $cont); 27 | 28 | $this->assertGreaterThan(10, $cont['countries']->count()); 29 | $this->assertGreaterThan(10, $cont['currencies']->count()); 30 | $this->assertGreaterThan(2, $cont['continents']->count()); 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /tests/test/ModelRecordTest.php: -------------------------------------------------------------------------------- 1 | countries()->all(); 40 | 41 | foreach ($countries as $country) { 42 | foreach (static::COUNTRY_ATTRIBS as $attr) { 43 | $result = $country->{$attr} ?: true; 44 | $this->assertNotEmpty($result); 45 | } 46 | } 47 | } 48 | 49 | 50 | /** 51 | * Test missing attribute. 52 | * 53 | * @return void 54 | */ 55 | public function testAttributeGetterError() { 56 | $this->expectException(ISORecordAttributeNotFound::class); 57 | 58 | (new ISOCodes()) 59 | ->countries() 60 | ->all() 61 | ->first() 62 | ->foobar; 63 | } 64 | 65 | } --------------------------------------------------------------------------------