METHODS

Constructors

$class->new( DIRECTORY, OPTIONS )

Accessors

$obj->directory

Returns the directory name.

$obj->addFile( BASENAME, [ABSOLUTE] )

Add a certain file to the index. This method returns the ABSOLUTE path to that file, which must be used to access it. When not explicitly specified, the ABSOLUTE path will be calculated.

$obj->find( TEXTDOMAIN, LOCALE )

Lookup the best translation table, according to the rules described in chapter DETAILS, below.

Returned is a filename, or undef if nothing is defined for the LOCALE (there is no default on this level).

» Error: illegal locale '$locale'
$obj->index

For internal use only. Force the creation of the index (if not already done). Returns a hash with key-value pairs, where the key is the lower-cased version of the filename, and the value the case-sensitive version of the filename.

$obj->list( DOMAIN )

Returned is a list of filenames which is used to update the list of MSGIDs when source files have changed. All translation files which belong to a certain DOMAIN are listed.

You probably need to filter the filenames further, for instance to reduce the set to only .po files, get rit of mo files and readme's.