METHODS

Constructors

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

$obj->nrPlurals

Managing PO's

$obj->msgid( STRING )

Lookup the translations with the STRING. Returns a SCALAR, when only one translation is known, and an ARRAY wheren there are multiple. Returns undef when the translation is not defined.

$obj->msgstr( MSGID, [COUNT] )

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