Visual Form Inheritance

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
JasonWilson
Posts: 2
Joined: Fri Apr 11, 2003 11:02 pm
Location: Toronto, Canada

Visual Form Inheritance

Post by JasonWilson »

I am currently investigating the various Delphi Globalization products available in the marketplace. I am particularly interested in how they deal with Visual Form Inheritance. Can anyone provide me with some feedback how the Tsi multilanguage components handle this?

Additionally, my application also makes extensive use of resource strings within several Delphi units (declared with the ResourceString keyword). What is the method by which these strings are included in the translation process?

Thank you in advance for your input.

Best Regards,

Jason Wilson
GlobeStar Systems Inc.
Toronto, Canada
JasonWilson
Posts: 2
Joined: Fri Apr 11, 2003 11:02 pm
Location: Toronto, Canada

Post by JasonWilson »

I've run some tests with the demo version of the software but am still uncertain whether TsiLang truly handles VFI.

i) I've added an auto-created datamodule to my project and added both a TsiLangDispatcher and TsiLang component to it. The dispatcher is set-up to fetch an external SIL file which contains the translations.

ii) I've created a "base class" form and added a TsiLangLinked component. I've inherited a new form out of the "base class" form and set the descendant TsiLangLinked's "IsInheritedOwner" property to "True".

iii) I've run the TsiLang Expert and saved all of the translations to an external SIL file (the same one the dipatcher is set to load).

iv) Using the SIL Editor, I have created a variety of translation strings in the external SIL file for the "base class" form. However I did *not* create any translations for the inherited form (I tried it both by leaving the inherited form's entries blank, and also by removing some/all of its entries from the file).

v) Upon running the application, instances of the "base class" form are translated properly, while there is no change to instances of the inherited form.

Thus the million dollar question: "Why does the inherited form not assume the translations of the ancestor form(s)?"

I'm somewhat fixated on this question simply because I have a final product that is comprised of 10-15 individual projects, and each of these projects include forms and units that descend from common ancestors. It would therefore be ideal if I could focus most of the translations on common ancestors and then simply override any miscellaneous changes within the descendants.


Best Regards,

Jason Wilson
GlobeStar Systems

P.S. Don't worry about the ResourseString question as I found my answer in the demo's documentation.
gaivans
Posts: 71
Joined: Fri Nov 29, 2002 4:10 pm

Post by gaivans »

Hello,

"Why does the inherited form not assume the translations of the ancestor form(s)?"

If both inherited and ancestor form are identical, the TsiLang component on the derived form automatically inherits translation data from the parent form. Howerer, in most cases the derived forms are changed, for examaple, they have additional controls. Therefore, TsiLang components on the inherited forms must have their own translations.

Of course, several strings will be duplicated in this case, but you can use Dictionary Manager to store common translations in a single .dic file. For example, you put strings from all child forms into a single .dic file. All recurring strings will be accepted only once. Then, you can provide your translator with that .dic file and Dictionary Manager. When the .dic file is translated you load its data back to all TsiLang components.
Best regards,
Serghei Gaivan
Post Reply