form in pakage

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
angelodiego
Posts: 4
Joined: Wed Jun 13, 2007 5:38 am

form in pakage

Post by angelodiego »

I have a form in a pakage inherited from one of the forms in my exe, I'd like to load the translation for the base form and then load only a separate translation for the objects added in the package, is this possible?
isiticov
Site Admin
Posts: 2416
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

What do you mean under "load"? Do you mean that you want to load translations from external file at run-time? If yes, then it is not possible to load translations separately except you use MergeAllFromFile() method.
Best regards,
Igor Siticov.
angelodiego
Posts: 4
Joined: Wed Jun 13, 2007 5:38 am

Post by angelodiego »

The problem with merge is that, as far as I can tell, you need an original file with the translation for the form and an additional one with the the missing strings, the classname of the form in the base exe is different from the one in the package so I don't have a complete translation to start with, is it possible to force the load of translation for a different class?
isiticov
Site Admin
Posts: 2416
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Unfortunately, it is not possible to enforce loading of information from different form. If you use SIL file to store translations you can just modify it by replacing form identifier in all entries and then load into another form.
Best regards,
Igor Siticov.
angelodiego
Posts: 4
Joined: Wed Jun 13, 2007 5:38 am

Post by angelodiego »

Is there a way of translating a base form and then translate only the objects on the inherited form, inheriting the translation from the base one?
isiticov
Site Admin
Posts: 2416
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

If you translate the base form and don't change any translation of its controls in inherited form then it will be re-used by TsiLang. If you change any base control's translation in inherited form then you will need to re-translate base control. Also please be sure to set IsInheritedOwner=True for TsiLang on inherited form.
Best regards,
Igor Siticov.
angelodiego
Posts: 4
Joined: Wed Jun 13, 2007 5:38 am

Post by angelodiego »

Does this work also if the translation streamed in the dfm is empty and I load everything from the sib file?
isiticov
Site Admin
Posts: 2416
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

No, I guess this won't work when DFM is empty and translations loaded from SIB file. When loading from SIB file TsiLang will just replace internal data with the information from SIB file. So if loading from SIB you need to be sure your SIB includes in inherited form all components translations.
Best regards,
Igor Siticov.
Post Reply