Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexander-schranz/iso-3166-2
Collection of all country subdivions by ISO 3166-2 https://en.wikipedia.org/wiki/ISO_3166-2.
https://github.com/alexander-schranz/iso-3166-2
Last synced: 2 months ago
JSON representation
Collection of all country subdivions by ISO 3166-2 https://en.wikipedia.org/wiki/ISO_3166-2.
- Host: GitHub
- URL: https://github.com/alexander-schranz/iso-3166-2
- Owner: alexander-schranz
- License: mit
- Created: 2015-10-07T12:48:28.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2022-05-30T11:58:28.000Z (over 2 years ago)
- Last Synced: 2024-05-02T01:13:27.382Z (8 months ago)
- Language: PHP
- Homepage:
- Size: 111 KB
- Stars: 9
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ISO 3166-2
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
``` php
$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.
| | Progress |
|---------------------|------------------------------------------|
| Subdivisions | ![100%](http://progressed.io/bar/100) |
| Specific Translates | ![1%](http://progressed.io/bar/1) |**Code Snippet to get the ISO from Wiki in Dev Tools**
``` js
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));
```