hadron-i18n
I18n for hadron applications
Last updated 4 years ago by durran .
Apache-2.0 · Original npm · Tarball · package.json
$ cnpm install hadron-i18n 
SYNC missed versions from official npm registry.

hadron-i18n

Extremely simple i18n support for hadron applications.

Installation

npm install --save hadron-i18n

Usage

Translations should be in .yml with the filenames all lowercase. Use camelcasing of keys for the ability to use dot notation.

myapp:
  toolbar:
    text: "Testing"
const I18n = require('hadron-i18n');
new I18n('de', 'en-GB').load('/path/to/my/locales', (error, i18n) => {
  global.t = i18n.t;
});

console.log(global.t.myapp.toolbar.text);

License

Apache 2.0

Current Tags

  • 0.0.1                                ...           latest (4 years ago)

1 Versions

  • 0.0.1                                ...           4 years ago

Copyright 2014 - 2016 © taobao.org |