iso-639-3

ISO-639-3 codes in an accessible format

Usage no npm install needed!

<script type="module">
  import iso6393 from 'https://cdn.skypack.dev/iso-639-3';
</script>

README

iso-639-3

Build Coverage Downloads Size

ISO 639-3 codes in an accessible format, all of them.

Install

This package is ESM only: Node 12+ is needed to use it and it must be imported instead of required.

npm:

npm install iso-639-3

Use

import {iso6393} from 'iso-639-3'

console.log(iso6393.slice(1820, 1830))

Yields:

[
  {name: 'En', type: 'living', scope: 'individual', iso6393: 'enc'},
  {name: 'Ende', type: 'living', scope: 'individual', iso6393: 'end'},
  {name: 'Forest Enets', type: 'living', scope: 'individual', iso6393: 'enf'},
  {
    name: 'English',
    type: 'living',
    scope: 'individual',
    iso6393: 'eng',
    iso6392B: 'eng',
    iso6392T: 'eng',
    iso6391: 'en'
  },
  {name: 'Tundra Enets', type: 'living', scope: 'individual', iso6393: 'enh'},
  {name: 'Enlhet', type: 'living', scope: 'individual', iso6393: 'enl'},
  {
    name: 'Middle English (1100-1500)',
    type: 'historical',
    scope: 'individual',
    iso6393: 'enm',
    iso6392B: 'enm',
    iso6392T: 'enm'
  },
  {name: 'Engenni', type: 'living', scope: 'individual', iso6393: 'enn'},
  {name: 'Enggano', type: 'living', scope: 'individual', iso6393: 'eno'},
  {name: 'Enga', type: 'living', scope: 'individual', iso6393: 'enq'}
]

API

This package exports the following identifiers: iso6393, iso6393To1, iso6393To2B, and iso6393To2T. There is no default export.

iso6393

Language[] — List of Languages.

Language

Object with the following properties:

  • name (string) — Language name
  • type (string) — Language type (Type)
  • scope (string) — Language scope (Scope)
  • iso6393 (string) — ISO 639-3 code
  • iso6392B (string?) — Bibliographic ISO 639-2 code
  • iso6392T (string?) — Terminologic ISO 639-2 code
  • iso6391 (string?) — ISO 639-1 code
Type

string, one of the following:

  • 'living' — still spoken languages (example: nhi for Zacatlán-Ahuacatlán-Tepetzintla Nahuatl)
  • 'historical' — distinct from any modern languages that are descended from it (example: ofs for Old Frisian)
  • 'extinct' — language that went extinct in recent time (example: rbp for Barababaraba)
  • 'ancient' — language that went extinct in ancient times (example: got for Gothic)
  • 'constructed' — artificial languages, but not programming languages (example: epo for Esperanto)
  • 'special' — non-language codes (example: und for Undetermined)
Scope

string, one of the following:

  • 'individual' — normal, single language (example: eng for English)
  • 'macrolanguage' — one-to-many grouping of languages, because older ISO 639s included them (example: ara for Arabic)
  • 'special' — non-language codes (example: und for Undetermined).

iso6393To1

Object.<string, string> — Object mapping ISO 639-3 code (eng) to ISO 639-1 codes (en).

iso6393To2B

Object.<string, string> — Object mapping ISO 639-3 code (eng) to bibliographic ISO 639-2 codes (eng).

iso6393To2T

Object.<string, string> — Object mapping ISO 639-3 code (eng) to terminologic ISO 639-2 codes (eng).

Related

License

MIT © Titus Wormer