Security Advisories (1)
CPANSA-PApp-2001-01 (2001-10-27)

Testing for nonexistant access rights always returned true.

NAME

PApp::I18n - internationalization support for PApp

open_translator $path, lang1, lang2...

open an existing translation directory

($lang, $table) = $translator->get_language($languages)

In scalar context, return a translator table for the language that best matches the $languages (always succeeds). In list context, return both the selected language and the translation table.

$translation = $table->gettext($msgid)

Find the translation for $msgid, or return the original string if no translation is found. If the msgid starts with the two characters "\" and "{", then these characters and all remaining characters until the closing '}' are skipped before attempting a translation. If you do want to include these two characters at the beginning of the string, use the sequence "\{\{". This can be used to specify additional arguments to some translation steps (like the language used). Here are some examples:

string      =>    translation
\{\string   =>    \translation
\{\{string  =>    \{translation
\{}string   =>    translation

To assure that the string is translated "as is" just prefix it with "\{}".

($msgid, $msgstr, @comments) = $po->next;

$po->add($msgid, $msgstr, @comments);

AUTHOR

Marc Lehmann <pcg@goof.com>