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
What is "gettext"? What is "variable evaluation"?
You haven't made very clear yet what you actually want to do.
Anno
'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
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