Skip to content

tellnes/jedify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jedify

Version npmnpm DownloadsBuild StatusDependenciesTips

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