Installation

Follow the steps below to start:

Download

Download here and add in your code :

<script src="path/languages.min.js"></script>

CDN

<script src="https://unpkg.com/languages-js@latest/languages.min.js"></script>

NPM

npm install languages-js --save

Yarn

yarn add languages-js

Bower

bower install languages-js

Usage

Follow the steps below to start:

Directories structure


> main.js
> languages
--> en_EN.json
		

Create JSON file : en_EN.json


[{
  "hello": "hello world"
},

}]
	

Initialize Languages and translate

In main.js


Languages.init('en_EN', './languages/', () => {
   'hello'.t() // hello world
});

Test