globalization-module

0.0.6 • Public • Published

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!"
}

Package Sidebar

Install

npm i globalization-module

Weekly Downloads

0

Version

0.0.6

License

ISC

Last publish

Collaborators

  • masterdev