Skip to content

sontek/po2json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

po2json

Converts gettext .po files to javascript objects.

Usage

You use the po2json command to generate all your script files:

First argument is locale path, Second is output path, and third is the translation domain.

$ po2json eventray/locale/ eventray/static/translations/ eventray

Then include babel.js and all your translation files in your website.

Then toi use the translation just pass the locale name to babel:

translations = babel.Translations.load(window["es"]).install();
trans_text = translations.gettext(text);

About

Converts gettext .po files to javascript objects.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published