Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tiagodanin/iso639-codes
ISO639 Codes for JavaScript
https://github.com/tiagodanin/iso639-codes
code-locality codes i18n iso iso639 iso639-1 iso639-2 json languages locale locales
Last synced: 14 days ago
JSON representation
ISO639 Codes for JavaScript
- Host: GitHub
- URL: https://github.com/tiagodanin/iso639-codes
- Owner: TiagoDanin
- License: mit
- Created: 2019-04-28T16:03:20.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-03T19:00:17.000Z (about 1 month ago)
- Last Synced: 2024-10-23T12:54:00.534Z (24 days ago)
- Topics: code-locality, codes, i18n, iso, iso639, iso639-1, iso639-2, json, languages, locale, locales
- Language: JavaScript
- Size: 27.3 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ISO639 Codes
[![Node](https://img.shields.io/node/v/iso639-codes.svg?style=flat-square)](https://npmjs.org/package/iso639-codes) [![Version](https://img.shields.io/npm/v/iso639-codes.svg?style=flat-square)](https://npmjs.org/package/iso639-codes) [![Downloads](https://img.shields.io/npm/dt/iso639-codes.svg?style=flat-square)](https://npmjs.org/package/iso639-codes) [![Travis](https://img.shields.io/travis/TiagoDanin/ISO639-Codes.svg?branch=master&style=flat-square)](https://travis-ci.org/TiagoDanin/ISO639-Codes)
ISO639 Codes for JavaScript
## Installation
Module available through the [npm registry](https://www.npmjs.com/). It can be installed using the [`npm`](https://docs.npmjs.com/getting-started/installing-npm-packages-locally) or [`yarn`](https://yarnpkg.com/en/) command line tools.
```sh
# NPM
npm install iso639-codes --save
# Or Using Yarn
yarn add iso639-codes
```## Example
```js
const iso = require('iso639-codes')iso['Portuguese'].name //'Portuguese'
iso['Portuguese'].names //['Portuguese']
iso['Portuguese']['iso639-2'] // 'por'
iso['Portuguese']['iso639-1'] // 'pt'iso['Balinese']['iso639-2'] // 'ban'
iso['Balinese']['iso639-1'] // nulliso['Chichewa'].name // 'Chichewa'
iso['Chichewa'].names // ['Chichewa', 'Chewa', 'Nyanja']
```## Documentation
### `iso639`
List of Languages### `iso639[language]`
Get ISO information- name (String)
- names (Array)
- iso639-2 (String)
- iso639-1 (String || null)### Source
**NOTE:** Source is [www.loc.gov/standards/iso639-2/php/English_list.php](https://www.loc.gov/standards/iso639-2/php/English_list.php)## Tests
To run the test suite, first install the dependencies, then run `test`:
```sh
# NPM
npm test
# Or Using Yarn
yarn test
```## Dependencies
None
## Contributors
Pull requests and stars are always welcome. For bugs and feature requests, please [create an issue](https://github.com/TiagoDanin/ISO639-Codes/issues). [List of all contributors](https://github.com/TiagoDanin/ISO639-Codes/graphs/contributors).
## License
[MIT](LICENSE) © [Tiago Danin](https://TiagoDanin.github.io)