globalization-module
v0.0.6
Published
Globalization package for node JS
Maintainers
Readme
globalization-module
A package for NodeJS API, choose the language of your texts
Example
var user_preferred_lang = "en_US";
var Globalization = require('globalization-module');
var globalization = new Globalization(user_preferred_lang);
console.log(globalization.lang("default.test")); //print My sample test text!
globalization.setLang("pt_BR");
console.log(globalization.lang("default.test")); //print Meu texto de exemplo!File: lang/en_US/default.json
{
"test": "My sample test text!"
}File: lang/pt_BR/default.json
{
"test": "Meu texto de exemplo!"
}