i18n-nodejs-browserify

1.0.0 • Public • Published

Install

npm install i18n-nodejs-browserify --save

Usage

New

var locale = require('./locale.json');
var lang = "fr";
var i18n_module = require('i18n-nodejs-browserify');

var i18n = new i18n_module(lang, locale);
console.log(i18n.__('Welcome'));

Languages file

Put it in the same folder as index.js

{
	"Welcome": {
		"ar": "مرحبا",
		"fr": "Bienvenue"
	},
	"Looking for user": {
		"ar": "نبحث الان عن مستخدم اخر"
	},
	"You have disconnected.": {
		"ar": "تم قطع الاتصال."
	},
	"Chat": {
		"ar": "شات"
	}
}

Package Sidebar

Install

npm i i18n-nodejs-browserify

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

9.81 kB

Total Files

3

Last publish

Collaborators

  • nguyen-tam