Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

internationalization module

0 views
Skip to first unread message

chatiman

unread,
Mar 2, 2004, 10:20:09 AM3/2/04
to
Hello,

I'm searching a module to translate my scripts into different languages.
Idealy this module will have the following features :
- Easy to use and install (part of the standard perl packages idealy)
- Can translate text with perl variables
eg: "Word $word"
- Would take a text identifier and returns the translated version with
variables
evaluated

Does this exists or do I have to write it ?


Thanks

Anno Siegel

unread,
Mar 2, 2004, 10:36:25 AM3/2/04
to
chatiman <chat...@free.fr> wrote in comp.lang.perl.misc:

Write it!

Anno

chatiman

unread,
Mar 2, 2004, 10:50:28 AM3/2/04
to

"Anno Siegel" <anno...@lublin.zrz.tu-berlin.de> a écrit dans le message de
news: c229lp$mi0$1...@mamenchi.zrz.TU-Berlin.DE...
> Write it!
>
Can "gettext" do that (variable evaluation) ?

> Anno


Anno Siegel

unread,
Mar 2, 2004, 1:28:13 PM3/2/04
to
chatiman <chat...@free.fr> wrote in comp.lang.perl.misc:
>

What is "gettext"? What is "variable evaluation"?

You haven't made very clear yet what you actually want to do.

Anno

Ben Morrow

unread,
Mar 2, 2004, 1:41:52 PM3/2/04
to

anno...@lublin.zrz.tu-berlin.de (Anno Siegel) wrote:
> chatiman <chat...@free.fr> wrote in comp.lang.perl.misc:
> >
> > "Anno Siegel" <anno...@lublin.zrz.tu-berlin.de> a écrit dans le message de
> > news: c229lp$mi0$1...@mamenchi.zrz.TU-Berlin.DE...
> > > Write it!
> > >
> > Can "gettext" do that (variable evaluation) ?
>
> What is "gettext"?

'gettext' is a standard i18n/l10n library.

> You haven't made very clear yet what you actually want to do.

I think he wants to localise his app... to the OP: look at
Locale::Maketext.

Ben

--
don't get my sympathy hanging out the 15th floor. you've changed the locks 3
times, he still comes reeling though the door, and soon he'll get to you, teach
you how to get to purest hell. you do it to yourself and that's what really
hurts is you do it to yourself just you, you and noone else ** b...@morrow.me.uk

Gunnar Hjalmarsson

unread,
Mar 2, 2004, 1:42:19 PM3/2/04
to

I'm sure there are quite a few tools to help you with
internationalization, so you don't need to re-invent that wheel.
Personally I'm applying a GNU gettext approach for i18n of a Perl
program, and I'm quite happy with it.

As you may know, the gettext language files consist of both the
English text strings and the strings of respective language, and I'm
creating those without Perl, i.e. using the GNU gettext program.

To incorporate them into my program I'm using this simple CPAN module:
http://search.cpan.org/perldoc?Locale%3A%3APGetText

By help of that module, DBM files are created out from the language
files. There is also a gettext() function (of course), and all the
output strings in the program are passed to that function, which picks
the strings from the selected DBM database.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

0 new messages