language-manager
The most flexible version of multi-language management. Manages language resources. Makes it easy to switch between different language sources.
Install
$ npm i -g npm
$ npm i --save language-manager
Usage
var LanguageManager = require('language-manager')
var l = new LanguageManager()
.setType(LanguageManager.ResourceType.Json)
.setPath('tests/resource')
.setLang('en-us')
var expected = 'Language Manager'
var actual = l
.Val('app.name')
console.log(`${l.Lang} : ${actual}`)
en-us : Language Manager
l.setLang('tr-tr')
expected = 'Dil Yöneticisi'
actual = l
.Val('app.name')
console.log(`${l.Lang} : ${actual}`)
tr-tr : Dil Yöneticisi
Test
$ npm run test
Pipelines