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 

Force Refresh

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



Joined: 26 May 2009
Posts: 15

PostPosted: Thu Aug 06, 2015 4:14 pm    Post subject: Force Refresh Reply with quote

Is it possible to force a TsiLang component to reapply its translations to the translated component properties?

I have the situation that I am using the DevExpress layout control to save control layouts and this control also stores and loads control captions.

After the loading of a layout all captions are untranslated again and I would like to force a specific TsiLang component to reapply it's translations.

I would prefer not to use the dispatcher for this, because this would reload translations on all connected TsiLang components which would be bad for performance.

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


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Fri Aug 07, 2015 5:50 am    Post subject: Reply with quote

Just call ChangeLanguage method of TsiLang.
Back to top
View user's profile Send private message
PvdL



Joined: 02 Jan 2014
Posts: 11

PostPosted: Mon Nov 02, 2015 12:46 pm    Post subject: Reply with quote

This trick doesn't work in certain situations. I have an application with 7 languages. English is the first (default) one and at startup a *.SIB file is loaded with the latest translations. After that I read from an inifile the latest used language and set Activelanguage to it. In case of English (=1) it doesn't work because setting ActiveLanguage to 1 (=English) doesn't trigger the refresh because the Activelanguage didn't really changed (it was 1 and changed to 1). The workaround now is reading the inifile, change Activelanguage to one higher of lower (if possible) and tha actual language. Would be much nicer just to call something like "Refresh" or "Reload".
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2097

PostPosted: Wed Nov 04, 2015 2:55 am    Post subject: Reply with quote

Calling ChangeLanguage method (this is the exact name of method) will enforce update of current translations on controls with info from TsiLang.
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