🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internationalization
2 messages
2 total messages Started by Andre Thu, 19 Apr 2007 12:30
Application translation problem
#24
Author: Andre
Date: Thu, 19 Apr 2007 12:30
37 lines
2007 bytes
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.
			
Re: Application translation problem
#25
Author: JF Jolin
Date: Thu, 19 Apr 2007 22:10
10 lines
1057 bytes
 From http://groups.google.com

You'll find plenty of info with search string:

translation   group:borland.public.cppbuilder.internationalization

Best regards

__
JF Jolin
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads