iso-language-converter
Converter between different ISO 639 language tags.
The list of codes is taken by Wikipedia, while the default scripts for each language is taken from this table.
Install
npm install --save iso-language-converter
Usage
var isoConv = ; ; // Italian; // Italian; // it ; // Italian; // it ; // Italian; // it ; // 'Latn'; // undefined
API
isoConv(input, [options])
input
Type: string
The code of the language in one of the ISO 639 form -or- the English name for the language.
options
Type: object
Options for the converter:
// number of ISO 639 from 1 to 5, or 'label' // if not specified, guess on the input from: 1 // number of ISO 639 from 1 to 5, 'label' or 'script' // if not specified, guess on the input to: 'label' // return an ISO 639-5 if the requested ISO is not present (not valid with to:'label') // default: false fallback: false
License
MIT