# this is usually not for end-users, See ::Extract::PerlPPI # using a PO table my $pot = Log::Report::Lexicon::POT ->read('po/nl.po', charset => 'utf-8') or die; my $po = $pot->msgid(''); print $pot->nrPlurals; print $pot->msgstr('msgid', 3); $pot->write; # creating a PO table my $po = Log::Report::Lexicon::PO->new(...); $pot->add($po); $pot->write('po/nl.po') or die;
This module is reading, extending, and writing POT files. POT files are used to store translations in humanly readible format for most of existing translation frameworks, like GNU gettext and Perl's Maketext. If you only wish to access the translation, then you may use the much more efficient Log::Report::Lexicon::POTcompact.
The code is loosely based on Locale::PO, by Alan Schwartz. The coding
style is a bit off the rest of Log::Report
, and there was a need to
sincere simplification. Each PO object will be represented by a
Log::Report::Lexicon::PO.