SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Static string tables

 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite
View previous topic :: View next topic  
Author Message
pls



Joined: 09 Feb 2004
Posts: 13
Location: Phoenix, AZ, USA

PostPosted: Thu Feb 12, 2004 11:09 pm    Post subject: Static string tables Reply with quote

How do you handle static string tables that should be translated. As in
static char const *Action[] =
{ "One", "Two", "Three", ...};
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2096

PostPosted: Fri Feb 13, 2004 6:06 am    Post subject: Reply with quote

May be such way would be applicable and helpful:

Code:
AnsiString String1;
AnsiString String2;
AnsiString String3;
static AnsiString * sActions[] =
{ &String1, &String2, &String3};
--------------------

Code:
void __fastcall TForm1::FormCreate(TObject *Sender)
{
  siLangLinked1ChangeLanguage(Sender);
}

void __fastcall TForm1::siLangLinked1ChangeLanguage(TObject *Sender)
{
  String1 = siLangLinked1->GetTextOrDefault("IDS_0" /* "One" */ );
  String2 = siLangLinked1->GetTextOrDefault("IDS_1" /* "Two" */ );
  String3 = siLangLinked1->GetTextOrDefault("IDS_2" /* "Three" */ );
}
Back to top
View user's profile Send private message
pls



Joined: 09 Feb 2004
Posts: 13
Location: Phoenix, AZ, USA

PostPosted: Fri Feb 13, 2004 9:08 am    Post subject: Reply with quote

Of course. I didn't make the connection with you Pascal code example.

Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite 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 p h p B B  © 2001, 2005 p h p B B  Group