Name: language-scripts
Owner: kartotherian
Description: Converts language code to script ID
Created: 2017-04-08 04:01:31.0
Updated: 2018-03-15 00:04:54.0
Pushed: 2018-03-15 00:04:53.0
Homepage: null
Size: 10
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Converts language code to script ID
Maps language codes to scripts, as defined in CLDR unicode database. The object is a singleton, and should not be modified.
t lsdata = require('language-scripts').data;
ole.log(lsdata['en']); // ==> Latn
ole.log(lsdata['ru']); // ==> Cyrl
Clones data
values, and can adjust key prefixes and add/remove values from the default.
t lsdata = require('language-scripts').adjust({
override: { 'be-tarask': 'Cyrl', 'fr': null},
prefix: 'name:'
ole.log(lsdata['name:en']); // ==> Latn
ole.log(lsdata['name:be-tarsk']); // ==> Cyrl
ole.log(lsdata['name:fr']); // ==> undefined
clone https://github.com/kartotherian/language-scripts.git
anguage-scripts
install
run init-cldr
run extract