# language-subtag-registry

> Full BCP 47 language subtag data from the official IANA repository, in JSON format with multiple indices.

Latest version **0.4.2** (published 2025-12-09) · CC0-1.0 license · 0 weekly downloads

## Install

```sh
npm install language-subtag-registry
pnpm add language-subtag-registry
yarn add language-subtag-registry
bun add language-subtag-registry
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.4.2 |
| Published | 2025-12-09 |
| First published | 2013-09-29 |
| Weekly downloads | 0 |
| License | CC0-1.0 |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 1.5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 89 |
| Maintainers | mcg |
| Keywords | iana, bcp47, subtags, rfc5646, language |

## Links

- npm: https://www.npmjs.com/package/language-subtag-registry
- Repository: https://github.com/mattcg/language-subtag-registry
- Issues: https://github.com/mattcg/language-subtag-registry/issues
- npm.io page: https://npm.io/package/language-subtag-registry

## Recent versions

- 0.4.2 (latest) — 2025-12-09
- 0.3.23 — 2024-05-21
- 0.3.22 — 2022-07-05
- 0.3.21 — 2020-10-27
- 0.3.20 — 2019-11-16
- 0.3.19 — 2019-07-31
- 0.3.18 — 2017-03-03
- 0.3.17 — 2016-11-18
- 0.3.16 — 2016-09-12
- 0.3.15 — 2016-07-18
- 0.3.14 — 2016-06-21
- 0.3.13 — 2016-01-12
- 0.3.11 — 2015-06-09
- 0.3.10 — 2015-05-03
- 0.3.9 — 2015-04-13
- … 11 more at https://npm.io/package/language-subtag-registry/versions

## README

# IANA Language Tags #

[![Open Data](https://assets.okfn.org/images/ok_buttons/od_80x15_blue.png)](http://opendefinition.org/)

IANA's [official repository](http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) is in [record-jar](http://www.inter-locale.com/ID/draft-phillips-record-jar-01.html) 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 `npm run import` 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](https://github.com/mattcg/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)](https://creativecommons.org/publicdomain/zero/1.0/legalcode) license.

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

---
_Source: https://npm.io/package/language-subtag-registry · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
