Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Node Gettext Generator

npm downloads license github-issues

nodei.co

Requirements

Node Gettext Generator requires Node v0.10.42 or greater.

Installation

Add dependency to package.json

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

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'
    }
});

About

Generate translation from your project source files to *.po files and compile to *.mo

Resources

License

Packages

No packages published