Translation in runtime

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
kdeberni
Posts: 11
Joined: Tue Aug 17, 2004 12:18 pm

Translation in runtime

Post by kdeberni »

Hi,

I have modular application system with one dispatcher and one container (TsiLangRT) on whole application. On each form I have TsiLangLinked which is connected to dispatcher and container. Using procedure TransEditorDlg I created posibility of editing translation of each form in runtime. That means in runtime user (translating person) pressing ShortCut keys receive translator dialog (from TransEditorDlg) with translation of current form and he is able to translate what is inside the SIL file regarding current form - connection over dispatcher-storage file.

But, there is a problem that in if the form is changed by developer, some components (labels,...) could not be in SIL file (if developer forget to update the SIL file). I would like to put this responseblity to translating person. So I would like to combinate information from the form and SIL file.
My question is: How to extract all properties from form and then translate all of them with content from SIL file (something like merge)? And the best using TransEditorDlg :-).

Any tips, propositions...

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

Post by isiticov »

In case your newer components have no trnaslations defined then you can do the following:
1. Load all data from SIL file using LoadAllFromFile()
2. Call BuildList() method. This will add existing components (not defined in SIL) to the list and remove obsolete components from list.
3. Call translations editor dialog for editing.

Hope this helps.
kdeberni
Posts: 11
Joined: Tue Aug 17, 2004 12:18 pm

Post by kdeberni »

Hi,

Thanks a lot. It works and it is great. :-)

I have just one more question. What is the easiest way to delete obselete components from the list?

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

Post by isiticov »

What list do you mean? Internal lists (stored in TsiLang) are updated automatically.
kdeberni
Posts: 11
Joined: Tue Aug 17, 2004 12:18 pm

Post by kdeberni »

Hi,

I mean the list I receive after loading the properties from SIL file and applaying the BulidList() procedure. After this I have a list which contains all properties but also some obsolete (properties which do not exists on edited form because of some changes).

Is there an easy way to delete them?

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

Post by isiticov »

After calling BuildList() all obsolete components/properties will be deleted from lists.
kdeberni
Posts: 11
Joined: Tue Aug 17, 2004 12:18 pm

Post by kdeberni »

Yes. You are absolutly right :-).
Now I see that all works just like I want it.

Thanks a lot for all
Kristijan Deberni
Post Reply