Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Application translation problem

13 views
Skip to first unread message

Andre

unread,
Apr 19, 2007, 8:30:42 AM4/19/07
to
Hi,

I am trying to find a better way to translate an
application I have.

I am using BC++ Builder 6. The strings I have in the code (.cpp or
.h) are gathered to a single header file (trans.h) wich contains defines
for each translation. I control wich group of #defines are used with
"#idef LANG1", etc. And every string in each control of the forms I
have, is initialized in its constructor. Example:

#include "trans.h"
(...)
__fastcall TFormMy::TFormMy(TComponent* Owner)
: TForm(Owner)
{
#ifdef LANG1
Caption = "Title in LANG1";
#elif defined LANG2
Caption = "Title in LANG2";
#endif
}

Where TFormMy is my app's main form, and it defines each title based
on the language defined in the file "trans.h".

I think the problem with this approach is that I generate code that
maybe unnecessary. The forms (and its controls) already have strings
kept inside them, and the constructor overrides them this way, right?

How could I change the strings at compilation time, but without this
extra code?

Thanks,

Andre.

JF Jolin

unread,
Apr 19, 2007, 6:10:01 PM4/19/07
to
From http://groups.google.com

You'll find plenty of info with search string:

translation group:borland.public.cppbuilder.internationalization

Best regards

__
JF Jolin

0 new messages