1.0.0 • Published 6 years ago

i18n-nodejs-browserify v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

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": "شات"
	}
}