|
Posted by Gregor Goldbach on May 31, 2007, 2:14 am
Please log in for more thread options
On 30 May 2007 09:24:49 -0700, llavicka wrote:
> I'm looking for an usable perl module that supports message catalogs.
> On CPAN, I found the following modules:
> - i18n
> - Locale::TextDomain
Locale::TextDomain works fine for us here. Just put
use Locale::TextDomain 'appname', undef;
at the top of your scripts and call gettext() or it's short cut __().
You definitely want to take a look at __x() which is the function you want
to use to interpolate values into messages.
Using Locale::TextDomain you are able to extract the messages with
xgettext this way:
xgettext --keyword=__ --keyword=__x --language=perl --from-code=utf-8 \
-o appname.pot -f list_of_files_to_extract_messages_from
--
Gregor Goldbach (PKI Team), DFN-CERT Services GmbH, Phone: +49 40 808077-621
DFN-CERT Services GmbH, https://www.dfn-cert.de, Phone +49 40 808077-555
Sitz / Register: Hamburg, AG Hamburg, HRB 88805, Ust-IdNr.: DE 232129737
|