Skip to content
Translator server for RequireJS i18n files.
JavaScript CoffeeScript Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
bin
lib
static
views
.gitignore
LICENSE
README.md
index.js
package.json
screenshot.png
server.coffee

README.md

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

Something went wrong with that request. Please try again.