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 

Maybe a minor bug

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



Joined: 03 Feb 2004
Posts: 22
Location: Québec

PostPosted: Tue Feb 10, 2004 3:40 pm    Post subject: Maybe a minor bug Reply with quote

I create this button :

procedure TForm1.Button5Click(Sender: TObject);
begin
Label1.Caption := siLang1.GetTextOrDefault('IDS_2' (* 'Manche de pelle' *) );
end;


And this two others(To change language):

procedure TForm1.Button4Click(Sender: TObject);
begin
silang1.ActiveLanguage := 1;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
silang1.ActiveLanguage := 2;
end;

The Default language is 1(French)
So when I click on Button5, the message 'Manche de pelle' is showing in Label1. If I click on Button3, to switch the language to English, the Label don't switch into English. I need to click on Button5 to have the English Version. Confused

If I leave this Like that, And I click on Button4 to switch language into french, the caption on Label1 becomes Label1....?!?! Sad

By Default, Label1.Caption = ''(I Erased the Caption in Object Inspector)
Question

Thanks! Wink
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2103

PostPosted: Wed Feb 11, 2004 5:45 am    Post subject: Reply with quote

When switching languages TsiLang won't call any your procedure call, instead placed in OnChangeLanguage event. In order to translate label's caption you can just use Captions property of TsiLang which responds for translating all captions. In case you need manually translate Caption property or anything else and reflect to language changing then it would be useful to place the code for updating properties to OnChangeLanguage event.
It is strange that label
s caption becomes Label1 when you switch to language #1 (may be there is some bug in our code we will check) but in order to exclude label from translation you can add it to DoNotTranslate property.

Hope this helps.
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