key-translate
v1.0.1
Published
Text keys translation
Readme
translate
Manage your frontend translations
Install
npm install key-translateUseage
var t = new Translate({
'country.Ukraine' => 'Україна',
'city.Kyiv' => 'Київ',
'city.Kyiv_founded' => 'заснований {age} років тому'
})
t.getMessage('city.Kyiv_founded', {age: (new Date()).getFullYear() - 482})Tests
- Install jasmine by
npm -g install jasmine- Run tests
npm tests