2.1.1 • Published 4 years ago

gettextjs v2.1.1

Weekly downloads
22
License
BSD-3-Clause
Repository
github
Last release
4 years ago

Build Status

Documentation Status

gettext.js

gettext.js provides a GNU gettext like interface for use in browsers, a MO file to JS transpiler and a webpack loader for MO files.

Full Docs: http://gettextjs.readthedocs.org/

Usage

Webpack

import English from 'locales/en/LC_MESSAGES/messages.mo';

English.gettext('hello world');
English.ngettext('bug', 'bugs', 4);

Runtime

import {gettext as _, ngettext, set_catalog} from "gettextjs";

set_catalog(...);

_("hello world");
ngettext("bug", "bugs", 4);

Compile

gettextjs <input> <output> turns the input MO file int a JS file.

2.1.1

4 years ago

2.1.0

4 years ago

2.0.0

6 years ago

1.2.0

7 years ago

1.1.0

8 years ago