TreeView translation does not work

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
Eva
Posts: 5
Joined: Mon Feb 02, 2009 9:13 am

TreeView translation does not work

Post by Eva »

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
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Hi!

May be you change the content of the tree-view in the code after changing language?
Best regards,
Igor Siticov.
Eva
Posts: 5
Joined: Mon Feb 02, 2009 9:13 am

Post by Eva »

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? :?:

Thanks
Eva
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

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.
Best regards,
Igor Siticov.
Eva
Posts: 5
Joined: Mon Feb 02, 2009 9:13 am

Post by Eva »

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
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

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.
Best regards,
Igor Siticov.
Eva
Posts: 5
Joined: Mon Feb 02, 2009 9:13 am

Post by Eva »

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

Thanks :)
Eva
Post Reply