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.
You'll find plenty of info with search string:
translation group:borland.public.cppbuilder.internationalization
Best regards
__
JF Jolin