1.0.3 • Published 6 years ago

translatorjs v1.0.3

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

translatorJS

i18n: Micro implementation of a translation system

The goal is to provide a very light plugin to handle translations. It is inspired on i18next-client

Installation

npm install translatorjs

Usage

var i18n = require('translatorjs');

i18n.init({
    translations: {
        dev: {
            hello: "Hello, World!",
            foo: {
                bar: "Fubar"
            },
            name: "Hello, __name__!"
        }
    }
});

i18n.t('hello'); // return "Hello, World!"
i18n.t('foo.bar'); // return "Fubar"
i18n.t('name', {name: "Dave"}); // return "Hello, Dave!"

Support

With the support of ARTACK WebLab GmbH

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago