l91 / iso-3166-2
PHP Lib for ISO 3166-2
Installs: 85 182
Dependents: 0
Suggesters: 0
Security: 0
Stars: 9
Watchers: 3
Forks: 6
Open Issues: 0
Requires
- php: >=5.3
README
Complete Collection of json files for the country subdivision from ISO 3166-2.
ISO 3166-2 https://en.wikipedia.org/wiki/ISO_3166-2
Usage
$ukSubdivisions = \L91\ISO_3166_2\Subdivision::getSubdivisions('gb');
Folder Structure
- subdivisions (all subdivisions by countrycode)
- countrycode (specific translations)
Example:
- subdivisions
- at.json (all subdivisions from austria in the default/country language)
- at
- en.json (english translated subdivisions)
Contribute
Feel free to contribute by add translates and co. from the ISO-3166-2.
Code Snippet to get the ISO from Wiki in Dev Tools
var obj = {}; $('.jquery-tablesorter tbody').eq(0).find('td:first-child').each(function() { obj[$.trim($(this).text())] = $.trim($(this).next().text()); }); console.log(JSON.stringify(obj, null, 4));