Generate inline i18n dictionary dictionary:
For Perl:
# This is auto-generated by App::I18N # ------------------------------ package {{app}}::dict::en; our $DICT = { "msgid" => "msgstr", ... }; package {{app}}::dict::zh_tw; our $DICT = { "msgid" => "msgstr", .... }; ...
For PHP:
en.php: <?php $DICT = array( "msgid" => "msgstr" .... ); ?> ....
For JSON
en.json: { "msgid..." : "msgstr" ... }; zh_tw.json: { .... };
Static JS
var dict; dict["en"] = { ... }; dict["zh_tw"] = { ... };
App::I18N::Command::Gen - Export dictionary to other formats.
po gen [TYPE] [OPTIONS]
TYPE:
Can be json, js, pm.
json
js
pm
--podir=[path] Po files directory --locale Use locale directory structure. --output=[path] Path for output.
To install App::I18N, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::I18N
CPAN shell
perl -MCPAN -e shell install App::I18N
For more information on module installation, please visit the detailed CPAN module installation guide.