Caption from a frame are not translated during runtime

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
Thomas J.
Posts: 129
Joined: Fri Jan 06, 2006 8:09 am

Caption from a frame are not translated during runtime

Post 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
isiticov
Site Admin
Posts: 2416
Joined: Thu Nov 21, 2002 3:17 pm

Post 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.
Best regards,
Igor Siticov.
Thomas J.
Posts: 129
Joined: Fri Jan 06, 2006 8:09 am

Post 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
isiticov
Site Admin
Posts: 2416
Joined: Thu Nov 21, 2002 3:17 pm

Post 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.
Best regards,
Igor Siticov.
Thomas J.
Posts: 129
Joined: Fri Jan 06, 2006 8:09 am

Post by Thomas J. »

I sent an example to your account
isiticov
Site Admin
Posts: 2416
Joined: Thu Nov 21, 2002 3:17 pm

Post 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.
Best regards,
Igor Siticov.
Thomas J.
Posts: 129
Joined: Fri Jan 06, 2006 8:09 am

Post by Thomas J. »

So and how I can solve the problem using frames?
isiticov
Site Admin
Posts: 2416
Joined: Thu Nov 21, 2002 3:17 pm

Post 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.
Best regards,
Igor Siticov.
Thomas J.
Posts: 129
Joined: Fri Jan 06, 2006 8:09 am

Post by Thomas J. »

ok, but this is only a workarround. Will this feature come in next release?
isiticov
Site Admin
Posts: 2416
Joined: Thu Nov 21, 2002 3:17 pm

Post 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.
Best regards,
Igor Siticov.
Post Reply