Page 1 of 1
Caption from a frame are not translated during runtime
Posted: Thu Dec 13, 2007 10:16 am
by Thomas J.
Hello,
I have the following problem
Frame1 (TFrame) with TsiLangLinked
Form1 (TForm) with TsiLangLinked
Form2 is inherited from Form1 and has the Frame1
Form3 is inherited from Form2
All caption in Form3 which are included in the Frame1 are not translated.
During design time everthing is correct and if I open the Editor for the Frame1->TsiLangLinked all caption are translated.
In the SIB I cannot find these caption so during runtime is nothing translated form this frame. If I open the SIB file I can only the the class Frame1 but I cannot see the Frame1 from Form2 and the Frame1 from Form3.
Thanks for your help
Posted: Thu Dec 13, 2007 10:43 am
by isiticov
Hello,
Only Frame1 must be visible in SIB and you need to translate it. You can set IsInheritedOwner=True for TsiLangs on frames placed on forms.
Posted: Thu Dec 13, 2007 12:38 pm
by Thomas J.
Yes I see only Frame1 and I needed as it is for Form2 and for Form3 I have to translate, but this is what I did. If I double click on the TsiLangLinked component in Form3 everything is translated.
like e.g.
Frame1->LbDate->Caption = "Date" (Form2)
Frame1->LbDate->Caption = "Purchase-Date" (Form3)
But at runtime only the captions of Form2 are visible in Form3
Posted: Thu Dec 13, 2007 3:37 pm
by isiticov
Do you use run-time loading or so? It is possible that this is "too complicated" case with VFI for TsiLang and it just unable to properly load(merge) inherited data. Anyway, if you try to recreate the problem on sample project and send it to us we will try to investigate deeper.
Posted: Fri Dec 14, 2007 10:14 am
by Thomas J.
I sent an example to your account
Posted: Fri Dec 14, 2007 1:34 pm
by isiticov
Thank you for the sample project. As I said previously TsiLang works just fine with all frames, inheritance and so. But you use run-time loading of translations from external files. And as result all translations changed in inherited frames get overwritten by initial values from SIB file since frames on form have the same type name as base frame. There is no way to save particular instance (when you place frame on any form this frames become just an instance of the original frame) of frame into the same SIB file because this will overwrite translations from the original frame.
Posted: Fri Dec 14, 2007 8:35 pm
by Thomas J.
So and how I can solve the problem using frames?
Posted: Mon Dec 17, 2007 12:14 pm
by isiticov
Since frames are used in case when there are needed just few changes in their UI, you can update the necessary controls in code of forms' where these frames are used. For example:
Code: Select all
Frame21->Label1->Caption = "Delivery"
and later use TsiLang Expert to translate this hard-coded string.
Posted: Mon Dec 17, 2007 3:59 pm
by Thomas J.
ok, but this is only a workarround. Will this feature come in next release?
Posted: Mon Dec 17, 2007 6:17 pm
by isiticov
Unfortunately, it is not possible to implement this. We will try to research more about this topic but I can't promise anything.