library countries
A library to help translating country-names into various standards and to text
rkr/countries
A library to help translating country-names into various standards and to text
- Thursday, June 9, 2016
- by rkr
- Repository
- 1 Watchers
- 3 Stars
- 1,819 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 3 Forks
- 0 Open issues
- 4 Versions
- 5 % Grown
rkr/countries
, (*1)
The country-codes are copied from umpirsky/country-list. I've only added some code-locators and some translators and removed all those formats not suited for my needs., (*2)
Some examples
Get all countries
$provider = new IcuCountryListProvider('en', 'GB');
print_r($provider->getCountries());
Array
(
[AF] => Afghanistan
[AX] => Åland Islands
[AL] => Albania
[DZ] => Algeria
[AS] => American Samoa
[AD] => Andorra
[AO] => Angola
[AI] => Anguilla
(248 more ...)
)
Get the name of a specific country
$provider = new IcuCountryNameLocator('en', 'GB');
echo $provider->getCountry('DE');
Germany
, (*3)
Get all EU-countries:
$provider = new EuCountryProvider('en', 'GB');
print_r($provider->getList());
Array
(
[BE] => Belgium
[BG] => Bulgaria
[CZ] => Czech Republic
[DK] => Denmark
[DE] => Germany
[EE] => Estonia
[IE] => Ireland
(22 more ...)
)
dev-master
9999999-dev
A library to help translating country-names into various standards and to text
Sources
Download
MIT
The Requires
The Development Requires
0.1.1
0.1.1.0
A library to help translating country-names into various standards and to text
Sources
Download
The Requires
The Development Requires
0.1
0.1.0.0
A library to help translating country-names into various standards and to text
Sources
Download
The Requires
The Development Requires
0.0.1
0.0.1.0
A library to help translating country-names into various standards and to text
Sources
Download
The Requires
The Development Requires