Skip to content

🌐 List of all countries with names and ISO 3166-1 codes in all languages and data formats.

License

Notifications You must be signed in to change notification settings

EVDW/country-list

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Country List (by EVDW)

This library allow you to get countries names and ISO codes in all languages for php usage.

Installing

$ composer require evdw/country-list

Using

Get a country names list in a specific language:

use EVDW\CountriesFactory;

$countriesFactory = new CountriesFactory;
$countriesFactory->getCountries('fr'); // Return a countries array in french

Get a country iso code, by specifying the language in which the country is written:

use EVDW\CountriesFactory;

$countriesFactory = new CountriesFactory;
$countriesFactory->getIsoCode('fr', 'france'); // Return the french ISO code

If the locale or the country name do not exist, no errors are throw, it returns null or empty array.

About

🌐 List of all countries with names and ISO 3166-1 codes in all languages and data formats.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%