Log::Report::Lexicon::MOTcompact - use translations from an MO file
Log::Report::Lexicon::MOTcompact is a Log::Report::Lexicon::Table
# using a MO table efficiently my $mot = Log::Report::Lexicon::MOTcompact ->read('mo/nl.mo', charset => 'utf-8') or die; my $header = $pot->msgid(''); print $mot->msgstr($msgid, 3);
This module is translating, based on MO files (binary versions of the PO files, the "Machine Object" format)
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.
Read the MOT table information from FILENAME. The msgctxt (context) is ignored.
-Option --Default charset <required> take_all <true>
The character-set which is used for the file. You must specify this explicitly, while it cannot be trustfully detected automatically.
This will cause the whole translation table to be read at once. If false, a file-handle will be kept open and translations read on demand. That may (but very well may not) save a memory foot-print, especially when the strings are large.
Returns the name of the source file for this data.
Returns a HASH of all defined PO objects, organized by msgid. Please try to avoid using this: use msgid() for lookup.
Lookup the translations with the STRING. Returns a SCALAR, when only one translation is known, and an ARRAY when we have plural forms. Returns
undef when the translation is not defined.
Returns the translated string for MSGID. When not specified, COUNT is 1 (the singular form).
This module is part of Log-Report distribution version 0.993, built on March 28, 2013. Website: http://perl.overmeer.net/log-report/
Copyrights 2007-2013 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