language-subtag-registry (0.3.23)

Published 2026-02-24 13:59:35 +00:00 by atheaadmin

Installation

registry=
npm install language-subtag-registry@0.3.23
"language-subtag-registry": "0.3.23"

About this package

IANA Language Tags

Open Data

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 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 patch 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

The JSON database is licensed under the Creative Commons Zero v1.0 Universal (CC0-1.0) license.

Comments, feedback and suggestions are welcome. Please feel free to raise an issue or pull request. Enjoy.

Dependencies

Development Dependencies

ID Version
jsonlint 1.x.x

Keywords

iana bcp47 subtags rfc5646 language
Details
npm
2026-02-24 13:59:35 +00:00
1
CC0-1.0
latest
194 KiB
Assets (1)
Versions (1) View all
0.3.23 2026-02-24