internationalization module

C

chatiman

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
 
A

Anno Siegel

chatiman said:
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 ?

Write it!

Anno
 
A

Anno Siegel

chatiman said:
Can "gettext" do that (variable evaluation) ?

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

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

Anno
 
G

Gunnar Hjalmarsson

chatiman said:
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 ?

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::PGetText

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top