views:

375

answers:

7

I have developed about 300 Applications which I would like to provide with multi-language capabilities independent from the Operating System. I have written a just-in-time translator, but that is too slow in applications with many components. What would you suggest I do?

+5  A: 

We are using TsiLang and are very happy with it.

One of the best points is that you can pretranslate the project with a dictionary (which you filled from existing translations).

gabr
Thanks for this - I'll vote you up tomorrow as I am out of stock for the day. :)
mm2010
+3  A: 

I've heard that the TsiLang components are nice, but your looking at an inplace solution...

I've used GNU gettext for Delphi which does exactly the thing you want, it loads the translations from a text file and replaces the text in your components. It even has a pas/dfm scanner to automatically generate the English translation file.

It's also possible to automatically change your pascal source code to inject the gettext procedure inplace of your static strings. If I'm not mistaken it just adds a underscore as function to it, as below.

ShowMessage('Hello'); // before
ShowMessage(_('Hello')); // after

I must say it has been 2 years since I last used this method.

One thing will remain problematic, the Delphi components are not unicode enabled (D2009 fixes this), so when you don't change the components you'll still have limited support for other languages.

Davy Landman
Sound good - I'll check it out.
mm2010
+3  A: 

A good free solution would be GNU gettext for Delphi. It has some capabilities not present in TsiLang - for example, you can put the knowledge on how to count things (different endings for one, two, four, hundred and two, many ...) into the translation file so that you don't have to teach each program to know this stuff.

License for the Delphi part is very permissive but I'm not sure how much the included GNU stuff will affect your application.

gabr
+1  A: 

Get Multilizer. It is made in Delphi and it can handle Delphi programs like no other with special support for VCL. You can even redo your screens easy for every language. With Multilizer you can use different techniques to translate and run your program.

Lars Truijens
+1  A: 

Delphi 2009 has added an Integrated Translation Environment/External Translation Manager ITE and ETM are now available for both Delphi and C++Builder.

In Codegear's article: What's New in Delphi and C++Builder 2009, they state:

The Integrated Translation Environment (ITE) is a part of the IDE that simplifies localizing your projects. ITE can create a new localized project from an existing project. ITE does not automatically translate text, but provides a dialog listing all text that needs to be localized and fields in which to enter the corresponding translated text. Once you have entered the translated text and built the localized project, you can set another language active and display a form in the localized text; you don't have to switch locales and reboot your system. This allows you to perform localization without requiring a localized system.

The External Translation Manager (ETM) is a standalone application that works with DFM files and text strings in the source code. Although ETM does not allow you to create a new localized project, it does provide a dialog listing localized text and the translated text, similarly to ITE.

This is what I plan to try first once I am at the point that I want to Internationalize my product.

However, to me the easy part is to translate the program. The hard part is to translate the help file.

lkessler
+1  A: 

I would say GNU gettext for Delphi in combination with TMS Unicode Component Pack (previously free under TntWare) to get unicode support in the components.

To work with, or have translators work with, the gettext files I recommend looking at the free cross-platform Poedit that may edit the .po files.

stefpet
+1  A: 

Just to mention cxLocalizer if you own DexExpress components.

Mihaela