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') or die; my $header = $mot->msgid(''); print $mot->msgstr($msgid, 3);
This module is translating, based on MO files (binary versions of the PO files, the "Machine Object" format)
Actually, this module is not "compact" anymore: not trading off speed for memory. That may change again in the future.
To get a MO file, you first need a PO file. Then run msgfmt, which is part of the gnu gettext package.
msgfmt -cv -o $domain.mo $domain.po # -c = --check-format & --check-header & --check-domain # -v = --verbose # -o = --output-file
Extends "DESCRIPTION" in Log::Report::Lexicon::Table.
Extends "METHODS" in Log::Report::Lexicon::Table.
Extends "Constructors" in Log::Report::Lexicon::Table.
Inherited, see "Constructors" in Log::Report::Lexicon::Table
Read the MOT table information from $filename.
-Option --Default charset <from header>
The character-set which is used for the file. When not specified, it is taken from the "Content-Type" field in the PO-file.
Extends "Attributes" in Log::Report::Lexicon::Table.
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.
Returns the character-set as found in the PO-file. The strings are converted into utf8 before you use them in the program.
Extends "Managing PO's" in Log::Report::Lexicon::Table.
Extends "Translation" in Log::Report::Lexicon::Table.
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.
undef
Returns the translated string for $msgid. When not specified, $count is 1 (the singular form).
Extends "Administration" in Log::Report::Lexicon::Table.
Inherited, see "Administration" in Log::Report::Lexicon::Table
This module is part of Log-Report-Lexicon distribution version 1.11, built on March 22, 2018. Website: http://perl.overmeer.net/CPAN/
Copyrights 2007-2018 by [Mark Overmeer <markov@cpan.org>]. 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://dev.perl.org/licenses/
To install Log::Report::Lexicon, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Log::Report::Lexicon
CPAN shell
perl -MCPAN -e shell install Log::Report::Lexicon
For more information on module installation, please visit the detailed CPAN module installation guide.