node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org »

jedify

jedify Version Badge

Dependency Status devDependency Status Tips

Browserify transformer for po files.

Usage

Somewhere in your client js:

var i18n = requirePo('./local/%s.po')

Now i18n will be an Jed instance.

%s will be replaced with the current selected language. The language can be selected by defining the lang parameter to jedify. The lang parameter in jedify defaults to en.

Eg.

browserify -t [jedify --lang nb_NO] entry.js

or

var browserify = require('browserify')
  , jedify = require('jedify')
 
var b = browserify()
b.add('./entry.js');
b.transform(jedify, { lang: 'nb_NO' })
b.bundle().pipe(process.stdout)

Install

npm install jedify

License

MIT