BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Application translation problem

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Students)
View previous topic :: View next topic  
Author Message
Andre
Guest





PostPosted: Thu Apr 19, 2007 5:17 pm    Post subject: Application translation problem Reply with quote



Hello,

I am trying to find a simple and robust way to translate an
application I have into 2 or more languages.

I am using BCB6 to compile write it. I need to translate string in
the code units (wich can be easy using #defines) and also the string in
the objects of each form the program has.

My solution would be to initialize all fields to be translated on the
form constructor, with a define to control wich language I want.

E.g:

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

But I think there may be a better way to do it, though I canīt find
it. A way to handle the resource files generated when I create the
forms... but I have no clue.

Any help, pointers or ideas appreciated.

Regards,

Andre
Back to top
danzer
Guest





PostPosted: Sat Apr 21, 2007 2:10 am    Post subject: Re: Application translation problem Reply with quote



Andre wrote:
Quote:
Hello,

I am trying to find a simple and robust way to translate an
application I have into 2 or more languages.

I am using BCB6 to compile write it. I need to translate string in
the code units (wich can be easy using #defines) and also the string in
the objects of each form the program has.

My solution would be to initialize all fields to be translated on the
form constructor, with a define to control wich language I want.

E.g:

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

But I think there may be a better way to do it, though I canīt find
it. A way to handle the resource files generated when I create the
forms... but I have no clue.

Any help, pointers or ideas appreciated.


Here are some ideas.

http://www.edm2.com/index.php/Multilingual_Resources

or google for "resource only dll"

Danzer
Back to top
Jeff Kish
Guest





PostPosted: Sat Apr 21, 2007 5:46 am    Post subject: Re: Application translation problem Reply with quote



On Fri, 20 Apr 2007 16:10:07 -0500, danzer <.> wrote:

Quote:
Andre wrote:
Hello,

I am trying to find a simple and robust way to translate an
application I have into 2 or more languages.

I am using BCB6 to compile write it. I need to translate string in
the code units (wich can be easy using #defines) and also the string in
the objects of each form the program has.

My solution would be to initialize all fields to be translated on the
form constructor, with a define to control wich language I want.

E.g:

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

But I think there may be a better way to do it, though I canīt find
it. A way to handle the resource files generated when I create the
forms... but I have no clue.

Any help, pointers or ideas appreciated.


Here are some ideas.

http://www.edm2.com/index.php/Multilingual_Resources

or google for "resource only dll"

Danzer
consider having a set of text files with you resources in them.

Your application could load the appropriate file at start up and read
the strings via some key at run time.
the advantage is that you don't need to build anything for different
languages, just have someone who knows the language translate one file
to another (say you supply an english one and you get a french
customer.. just have someone, not necessarily a programmer, translate
the file into french and load that one at startup.)

advantages are no developers needed to do different languages and end
users can supply their own translations if they need to.

So maybe you have a text file with sections codes and messages in it
then, for each language.
hth
Jeff Kish
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Students) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.