Package Exports
- language-subtag-registry/data/json/index
- language-subtag-registry/data/json/macrolanguage
- language-subtag-registry/data/json/meta
- language-subtag-registry/data/json/registry
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (language-subtag-registry) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
IANA Language Tags
IANA's official repository is in record-jar format and is hard to parse. This project provides neatly organized JSON files representing that data.
See lib/data/
for all the JSON files available. The registry.json
file contains all records in a flat array and meta.json
contains its metadata. There's a separate JSON file for each 'scope' (e.g. macrolanguage.json
) and 'type' (e.g. language.json
). These files contain JSON objects keyed by tag or subtag and with the index integer for the corresponding entry in registry.json
as a value. This makes lookups fast.
Updates
This project will be updated as the registry changes. Non-breaking updates will result in the minor version number being bumped.
Run make update
to force an update from the latest official IANA-hosted version. The registry file format is converted to JSON automatically and the files in data/
are updated.
If there are changes, please make a pull request.
Usage
See language-tags for a Javascript API.
Credits and collaboration
Update scripts copyright (c) 2013, Matthew Caruana Galizia and licensed under and MIT license.
The JSON database is licensed an Open Data Commons Attribution License (ODC-BY).
Comments, feedback and suggestions are welcome. Please feel free to raise an issue or pull request. Enjoy.