Message Catalogs -- looking for usable module

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hi all,

I'm looking for an usable perl module that supports message catalogs.
On CPAN, I found the following modules:
- i18n
- Locale::TextDomain

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:

Quoted text here. Click to load it

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, ,   Phone +49 40 808077-555
Sitz / Register: Hamburg,  AG Hamburg,  HRB 88805,  Ust-IdNr.: DE 232129737

Site Timeline