@iso-639/data

0.2.0 • Public • Published

@iso-639/data

GitHub stars

Contains code lists for ISO 639-1 and ISO 639-2 as well as multi-language support.

Friendly Reminder

We provided @iso-639/mapping mapping toolkit, which can easily help you manage language data.

Usage

With npm(or yarn, or pnpm):

npm install @iso-639/data

In .js / .ts or other files:

// ISO 639-1 is stored in the `1` directory
import ISO_639_1_EN from '@iso-639/data/1/en.json'
import ISO_639_1_ZH_CN from '@iso-639/data/1/zh-CN.json'

// ISO 639-2 is stored in the `2` directory
import ISO_639_2_EN from '@iso-639/data/2/en.json'
import ISO_639_2_ZH_CN from '@iso-639/data/2/zh-CN.json'

With CDN:

<script>
  const res = await fetch('https://cdn.jsdelivr.net/npm/@iso-639/data/1/en.json')
  const json = await res.json()
</script>

Multi-language Support

JSON files named with language codes in the source code directory are supported languages.

See: Source Code

Release Notes

Please refer to CHANGELOG for details.

License

MIT License © 2023-PRESENT chengpeiquan

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @iso-639/data

      Weekly Downloads

      1

      Version

      0.2.0

      License

      MIT

      Unpacked Size

      174 kB

      Total Files

      21

      Last publish

      Collaborators

      • chengpeiquan