Download the PHP package sukohi/country-code without Composer
On this page you can find all versions of the php package sukohi/country-code. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download sukohi/country-code
More information about sukohi/country-code
Files in sukohi/country-code
Download sukohi/country-code
More information about sukohi/country-code
Files in sukohi/country-code
Vendor sukohi
Package country-code
Short Description Country codes based on iso 3166-1 like country name, alpha-2 code, alpha-3 code or numeric code for PHP
License MIT
Package country-code
Short Description Country codes based on iso 3166-1 like country name, alpha-2 code, alpha-3 code or numeric code for PHP
License MIT
Please rate this library. Is it a good library?
Informations about the package country-code
CountryCode
Country codes based on iso 3166-1 like country name, alpha-2 code, alpha-3 code or numeric code for PHP
Installation
Execute composer command.
composer require sukohi/country-code:1.*
Usage
$country_code = new \Sukohi\CountryCode\CountryCode();
$mode = 'alpha-2'; // or alpha-3, numeric (skippable)
// Array
$country_data = $country_code->getArray($mode);
print_r($country_data);
// Country Name
$key = 'US';
$mode = 'alpha-2'; // or alpha-3, numeric (skippable)
$locale = 'en'; // (skippable)
echo $country_code->countryName($key, $mode, $locale); // United States
Contribution
If you can translate country names to your mother language, please add the names in assets/csv/country_codes.csv
.
And I'm glad if you would create a pull request.
Thank you!
License
This package is licensed under the MIT License.
Copyright 2016 Sukohi Kuhoh
All versions of country-code with dependencies
PHP Build Version
Package Version
No informations.
The package sukohi/country-code contains the following files
Loading the files please wait ....