Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
May 30, 2007, 4:24 pm
rate this thread
I'm looking for an usable perl module that supports message catalogs.
On CPAN, I found the following modules:
I would like to combine the usage of the message catalogs with
Has anybody experience with the usage of these modules? Which one
would you recommend? Are there any better practices?
Thank you for your support,
Re: Message Catalogs -- looking for usable module
On 30 May 2007 09:24:49 -0700, llavicka wrote:
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