ui-translator

1.0.4 • Public • Published

UI-Translator

Translator server for RequireJS i18n files. See http://requirejs.org/docs/api.html#i18n for more details. Currently the server requires that you have defined your root bundle in the top level module.

Server can handle both .js and .coffee files.

Install

npm install -g ui-translator

Example:

//Contents of my/nls/colors.js
define({
    "root": {
        "red": "red",
        "blue": "blue",
        "green": "green"
    },
    "fr-fr": true
});
//Contents of my/nls/fr-fr/colors.js
define({
    "red": "rouge",
    "blue": "bleu",
    "green": "vert"
});

then running the server with

ui-translator my/

You may also pass second argument which is list of ignored paths for the parser. ie.

ui-translator my/ my/other,my/third

Then when the parser walks through the root folder and if there would be my/other/nls -folder it would get ignored

Screenshot

screenshot

Readme

Keywords

none

Package Sidebar

Install

npm i ui-translator

Weekly Downloads

1

Version

1.0.4

License

none

Last publish

Collaborators

  • jerryjj