Page 1 of 1

Translation in runtime

Posted: Mon Mar 21, 2005 8:34 am
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

Posted: Mon Mar 21, 2005 2:48 pm
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.

Posted: Tue Mar 22, 2005 6:41 am
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

Posted: Tue Mar 22, 2005 7:27 am
by isiticov
What list do you mean? Internal lists (stored in TsiLang) are updated automatically.

Posted: Thu Mar 24, 2005 6:14 am
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

Posted: Thu Mar 24, 2005 6:17 am
by isiticov
After calling BuildList() all obsolete components/properties will be deleted from lists.

Posted: Thu Mar 24, 2005 10:23 am
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