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 

TreeView translation does not work

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



Joined: 02 Feb 2009
Posts: 5

PostPosted: Mon Sep 21, 2009 10:15 am    Post subject: TreeView translation does not work Reply with quote

Hi !

I have a form with a TreeView translated with TsiLangTLV.
TsiLangTLV uses LangDispatcher with two languages german and french.
The default language is german.

I set ActiveLanguage from LangDispatcher to french.

All forms work fine but the TreeView isn't translated if applikation is running, it is always in the default language.

Any ideas what's rong? Idea

Thanks

Best Regards
Eva

ps: using SiComponents Version 6.5
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2103

PostPosted: Mon Sep 21, 2009 10:34 am    Post subject: Reply with quote

Hi!

May be you change the content of the tree-view in the code after changing language?
Back to top
View user's profile Send private message
Eva



Joined: 02 Feb 2009
Posts: 5

PostPosted: Mon Sep 21, 2009 11:17 am    Post subject: Reply with quote

Hi!

Thanks for the quick response.

The problem is after start the application, not in design.
I check the SIB-File, it contains the new tree-view items.


Any other tips? Question

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


Joined: 21 Nov 2002
Posts: 2103

PostPosted: Mon Sep 21, 2009 11:37 am    Post subject: Reply with quote

Yes, I mean that it might be that after changing language at run-time there is some code in your application that dynamically fill content of the tree-view.
Back to top
View user's profile Send private message
Eva



Joined: 02 Feb 2009
Posts: 5

PostPosted: Mon Sep 21, 2009 12:57 pm    Post subject: Reply with quote

Yes, you are absolutely right.

The tree-view is depends on the user rigths and is dynamically filled.

Now after fill I call the procedure
siLangTLV1.ChangeLanguage

Is there a better way, what would you suggest?

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


Joined: 21 Nov 2002
Posts: 2103

PostPosted: Mon Sep 21, 2009 1:12 pm    Post subject: Reply with quote

I wouldn't recommend to use TsiLangTLV on tree-views that contain dynamic content. Because if it is dynamic the translation may appear incorrect since TsiLang just translates items by index. I would recommend you to create a method that will fill content of the tree-view depending on needed conditions and use in this methid TsiLang's GetTextOrDefault() methods for the strings. Lately during run-time I would call this method inside OnChangeLanguage event of TsiLang in order to be sure the UI content is in correct language.
Hope this helps.
Back to top
View user's profile Send private message
Eva



Joined: 02 Feb 2009
Posts: 5

PostPosted: Mon Sep 21, 2009 1:38 pm    Post subject: Reply with quote

Thanks for opening my eyes and for your good tips.
I try to realize your suggest.

Thanks Smile
Eva
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