Generate translation from your project source files to *.po files and compile to *.mo
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
tests
.gitignore
LICENCE
README.md
index.js
package.json

README.md

Node Gettext Generator


Requirements

Node Gettext Generator requires Node v0.10.42 or greater.

Installation

Add dependency to package.json

{
  ...
  "dependencies": {
     "node-gettext-generator": "^0.2.8"
  }
  ...
}

Example

var generator = require('node-gettext-generator');
generator.process({
    extract:{
        path  :['./src/views'],
        target:'./src/locale/templates.js'
    },
    params : {
        name: 'messages',
        keywords:['_'],
        source:['./src/views','./src/js/app','./src/locale'],
        target:'./locales',
        locales:['ru','en','uk','lv','cs','fr','sk']
    },
    javascript:{
        namespace:'i18n'
    }
});