Browserify transformer for po files.
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)
npm install jedify
MIT