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 

Get the original caption after translate

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



Joined: 12 May 2003
Posts: 12

PostPosted: Wed Jul 30, 2003 12:30 pm    Post subject: Get the original caption after translate Reply with quote

Hi there,

how can i get the original caption of a button after it have being translate to other language ?

regards,
magic Crying or Very sad
Back to top
View user's profile Send private message
gaivans



Joined: 29 Nov 2002
Posts: 71

PostPosted: Wed Jul 30, 2003 2:34 pm    Post subject: Reply with quote

Hello,

What do you mean by "it have being translate to other language"? If your TsiLang component has more than one language, then it holds as original captions (Languge #1) as well as translated to other languages ones. You will need just set TsiLang.ActiveLanguage = 1 in design-time and all captions on the form will get their original values.
Back to top
View user's profile Send private message AIM Address MSN Messenger
magicang



Joined: 12 May 2003
Posts: 12

PostPosted: Thu Jul 31, 2003 12:23 am    Post subject: Reply with quote

Hi there,

thanks for the quick reply.

what i menas is, after tsilang translate the form, i wan to retrieve the original text of my tbutton without set the language back to original language in run time.

regards,
magaic
Back to top
View user's profile Send private message
gaivans



Joined: 29 Nov 2002
Posts: 71

PostPosted: Thu Jul 31, 2003 6:51 am    Post subject: Reply with quote

Hello,

You can use in run-time the TsiLang's public method
function GetStringValue(AStrings: pStrings; AName: Tstring; ALang: Integer): Tstring;
where AStrings - pointer to a string list; AName - name of a component or string identifier; ALang - number of language (use 1 for default language).

For example, to extract default caption for Button1 you can use:
...
var
S: string;
...
S := siLang1.GetStringValue(@siLang1.Captions, Button1.Name, 1);
...


or more compactly:
...
with siLang1 do
S := GetStringValue(@Captions, Button1.Name, 1);
...
Back to top
View user's profile Send private message AIM Address MSN Messenger
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