tiny-translation-node
The simplest NodeJS i18n module
Install
$ npm install tiny-i18n-node
Usage
First of all, create your lang/*.json
files inside your root folder.
See some examples
en.json
es.json
br.json
Then use it:
const trans = //=> "Tiny module to handle NodeJS i18n"
You get the current location:
trans //=> Default: "en"
Or switch between them:
// Switch to Spanishtrans //=> "Pequeño módulo para manejar la internacionalización de Node JS"
Set some replacements:
//=> "Welcome, John!"
License
MIT © Alison Monteiro