Two problems

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
Thrillhouse
Posts: 14
Joined: Tue Jan 12, 2010 3:52 am

Two problems

Post by Thrillhouse »

Hello again.

I have two things to ask about today, the first on behalf of the superior:

When there are multiple projects with forms within our single C++ Builder6 project group, can we import from and export to a single file from all projects in the group at a time?

Now for my question:

We use at least two forms in our application which have other forms embedded in them. As a result, the embedded forms cannot be assigned a TsiLangLinked object, as we then receive errors about being unable to have two TsiCustom objects on the one form. Is there a way to correctly process and translate the embedded forms using this tool?

Looking forward to hearing back from you.
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Hello,

No, for all project at a time it is not possible to load/export translations. You can only open TsiLang Expert activate the needed project in Project Manager and then use Load Project in TsiLang Expert. This will be needed for all projects in a group.
Could you please specify what do you mean under "embedded"? Do you use frames or place in inside another form at run-time? In case of frames usage just place a TsiLang on the frame, in case of placing a form at run-time just place TsiLang on the from beign embedded at design time. The main pint is that OWNER of the TsiLang shall be different. So if you place formA onto formB then there should be 2 TsiLang components TsiLang-fromA and TsiLang_formB. So later when you create these forms at run-time there won't be the mentioned error message.
Best regards,
Igor Siticov.
Thrillhouse
Posts: 14
Joined: Tue Jan 12, 2010 3:52 am

Post by Thrillhouse »

I'll try what you've suggested with the embedded forms when the opportunity presents itself, and get back to you.
Thrillhouse
Posts: 14
Joined: Tue Jan 12, 2010 3:52 am

Post by Thrillhouse »

That didn't seem to work, though I may have misunderstood the suggestion. It's still giving the same error:


Only one TsiCustomLang component per Form/DataModule allowed!

when we try to put the forms together. Is there anything else you can suggest?
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

I mean something like the following:

TformA * formA = new TformA(Application);
TformB * formB = new TformB(Application);
TsiLang * SI = new TsiLang(formB);
fromB->Parent = formA;
formB->Top = 10;
formB->Left = 10;
fromB->Show();

In this way the fromB will be the owner of the SI (TsiLang) component.
Best regards,
Igor Siticov.
Thrillhouse
Posts: 14
Joined: Tue Jan 12, 2010 3:52 am

Post by Thrillhouse »

My code noob-iness is coming out now. If this is happening at runtime, how are we populating the translations for both forms?
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Now it is my turn :lol: To populate translations it would be easiest to do this at design-time. But then how do you embedd forms at design-time? If you're able to embedd them at design-time then just place a TsiLang on embedding form before the embedding and then it will be the owner of this TsiLang.
If you do the embedding at run-time the way described above then there is solution like the following:
1. At test build add a code to save the TsiLang created at run-time to the file, like:
siLang_formB->BuildLists();
siLang_formB->SaveAllToBinaryFile('some.sib');
2. After editing the SIB file add a code to your fina build that will load the translations from this file to the TsiLang.

If all of these still non-applicable then I would ask you for the sample project that demonstrates your problem and then we will try to provide you with the solution.
Best regards,
Igor Siticov.
Post Reply