NAME
Log::Report::Lexicon::POTcompact - use translations from a POT file
INHERITANCE
Log::Report::Lexicon::POTcompact
is a Log::Report::Lexicon::Table
SYNOPSIS
# using a PO table efficiently
my $pot = Log::Report::Lexicon::POTcompact
->read('po/nl.po', charset => 'utf-8')
or die;
my $header = $pot->msgid('');
print $pot->msgstr('msgid', 3);
DESCRIPTION
This module is translating, based on PO files. PO files are used to store translations in humanly readable format for most of existing translation frameworks, like GNU gettext and Perl's Maketext.
Internally, this module tries to be as efficient as possible: high speed and low memory foot-print. You will not be able to sub-class this class cleanly.
If you like to change the content of PO files, then use Log::Report::Lexicon::POT.
See documentation in the base class.
METHODS
See documentation in the base class.
Constructors
See documentation in the base class.
- Log::Report::Lexicon::POTcompact->new(OPTIONS)
- Log::Report::Lexicon::POTcompact->read(FILENAME, OPTIONS)
-
Read the POT table information from FILENAME, as compact as possible. Comments, plural-form, and such are lost on purpose: they are not needed for translations.
-Option --Default charset <required>
Attributes
See documentation in the base class.
Managing PO's
See documentation in the base class.
Translation
See documentation in the base class.
- $obj->msgid(STRING, [MSGCTXT])
-
Lookup the translations with the STRING. Returns a SCALAR, when only one translation is known, and an ARRAY wherein there are multiple. Returns
undef
when the translation is not defined. - $obj->msgstr(MSGID, [COUNT, [MSGCTXT])
-
Returns the translated string for MSGID. When not specified, COUNT is 1 (the single form).
Administration
See documentation in the base class.
- $obj->add(PO)
- $obj->header(FIELD)
- $obj->nrPlurals()
- $obj->pluralIndex(COUNT)
- $obj->setupPluralAlgorithm()
- $obj->translations([ACTIVE])
DIAGNOSTICS
SEE ALSO
This module is part of Log-Report-Lexicon distribution version 1.00, built on January 05, 2014. Website: http://perl.overmeer.net/log-report/
LICENSE
Copyrights 2007-2014 by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html