Text in D article

Anders F Björklund afb at algonet.se
Sun Nov 19 06:38:56 PST 2006


Pierre Rouleau wrote:

>> I don't know if gettext would work in D, simply because I've never seen
>> it tried.  D doesn't have any *direct* support for this, tho.
> 
> I can't see why it would not.  Can we have a function named  '_()' in D?

Yes, we are using this in wxD - it also works for GNU gettext with D.

It's defined as an alias that leads to a function with a longer name:

public static string wx.wxObject.GetTranslation(string str);

extern(C) char * gettext (char * msgid);

--anders



More information about the Digitalmars-d mailing list