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

undef

charset => STRING
When the charset is not specified, it will be taken from the content-type field in the po-file header.

Attributes

$obj->filename

Returns the name of the source file for this data.

$obj->originalCharset

[1.09] Returns the character-set of the strings found in the file. They will get translated into utf8 before being used in Perl.

Managing PO's

Translation

$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

$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.