Click here to get back home

Message Catalogs -- looking for usable module

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Message Catalogs -- looking for usable module llavicka 05-30-2007
Posted by llavicka on May 30, 2007, 12:24 pm
Please log in for more thread options


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
Log::Log4perl.
Has anybody experience with the usage of these modules? Which one
would you recommend? Are there any better practices?

Thank you for your support,

Lubos


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


Similar ThreadsPosted
Win32_API Not usable September 25, 2004, 9:52 pm
Re: Win32_API Not usable September 25, 2004, 10:27 pm
Re: Win32_API Not usable September 25, 2004, 10:37 pm
Re: Win32_API Not usable September 26, 2004, 7:24 pm
Re: Win32_API Not usable September 27, 2004, 6:17 pm
what module is the windows message box in? September 23, 2004, 11:42 am
Is there a module to help me to send/receive msg and file with MSN message? May 12, 2005, 2:03 am
Net::FTP $ftp->message question July 21, 2005, 12:32 pm
sending an SMS message November 11, 2005, 8:15 pm
Cannot get timeout error message from Net::Cmd January 4, 2005, 4:45 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap