METHODS

Constructors

$class->new( OPTIONS )
See new in Log::Report::Lexicon::Table.
$class->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>

charset => STRING
The character-set which is used for the file. You must specify this explicitly, while it cannot be trustfully detected automatically.

Attributes

$obj->filename

Returns the name of the source file for this data.

$obj->index

Returns a HASH of all defined PO objects, organized by msgid. Please try to avoid using this: use msgid() for lookup.

Managing PO's

Translation

$obj->msgid( STRING )

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, CONTEXT] )

Returns the translated string for MSGID. When not specified, COUNT is 1 (the single form).

Administration

$obj->add( PO )
See add in Log::Report::Lexicon::Table.
$obj->nrPlurals
See nrPlurals in Log::Report::Lexicon::Table.
$obj->pluralIndex( COUNT )
See pluralIndex in Log::Report::Lexicon::Table.
$obj->setupPluralAlgorithm
See setupPluralAlgorithm in Log::Report::Lexicon::Table.
$obj->translations( [ACTIVE] )
See translations in Log::Report::Lexicon::Table.