Skip to content

Countries and languages names and codes for PHP.

Notifications You must be signed in to change notification settings

Parziphal/world-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Countries and languages

List of countries and languages, in english. Countries have their corresponding ISO 2, ISO 3 and ISO Numeric codes; languages have their corresponding ISO 639-1 codes.

There are two classes under the Parziphal\WorldData namespace: Languages and Countries. These can be used to get the data of each resource, and to optionally customize it:

use Parziphal\WorldData\Countries;

// Get all data columns
$countries = Countries::get();

// Get only country names
$countries = Countries::get(['name']);

// Get both "names" and "iso_code_2" columns, and change "iso_code_2" column name to just "iso"
$countries = Countries::get(['name', 'iso_code_2' => 'iso']);

Credits

License

MIT

About

Countries and languages names and codes for PHP.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages