views:

228

answers:

2

I'm writing a program for both Delphi and Lazarus/FreePascal, so I can also reach customers using Linux or Mac OS X.

Is there a cross-platform tool that works in both environments too, so I can add multiple languages? I tried GNU Gettext for Delphi and C++ Builder, but it does not compile in Lazarus for Mac OS X. Is there anything comparable?

A: 

DKLang Localization Package is an open source project that works very well. It has not been tested under FreePascal, but we would be willing assist with any needed changes.

BJ Miller
mamcx
The TNT dependency is only on the pre D2009 version.
BJ Miller
FPC can't yet run D2009+ code. While TUnicodestring exists, it is rudimentary.
Marco van de Voort
A: 

No, simply since the only system that FPC uses is gettext. Lazarus afaik uses gettext, also on OS X, but obviously the FPC one, not the delphi one.

I suggest you devote some more attention to getting the gettext solution to work, maybe asking specific questions here.

In reply to your comment:

If I look in the LCL, I see in the translate routines stuff that translates properties of tpersistents, but only for special "TTranslatestrings" fields. So it doesn't seem to translate full forms directly.

Did you have a look at this:? http://wiki.lazarus.freepascal.org/DxGetText

Marco van de Voort
I understand that Lazarus use resourcestrings to make localization work. I don't find anything about simply use gettext code like _('Hello') function or TranslateComponent or automatic form translation.
mamcx
I enhanced the answer with the resuls of a round of searching
Marco van de Voort
mamcx
I could live with not automatic form traslation (my gui is minimal), but the lazarus DxGetText no compile at all, so i'm lost on this...
mamcx
You need delphi mode obviously.
Marco van de Voort