Problem with SIL File

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

Problem with SIL File

Post by Thomas J. »

I'm using BC++ 6 and version 6.0.1 of sicomp.
I have a TsiLangDispatcher with 3 languages and a TsiLangRT in the base form class. Many forms with which are inherited from the base form class with the TsiLangRT component.
In my SIL file I see all translated words. But..
1. If I design the forms and I switch the dispatcher language not all forms switch to the language of the dispatcher (all linked to the dispatcher)
2. On execution all the forms which are don't switch during the design time are switching the language all the other forms not
I checked the SIL file and found

TFrmEinstellungen.TFrmEinstellungen=Einstellungen~!@#Properties~!@#~!@#
TFrmEinstellungen.LbALTage=Tage~!@#Days~!@#~!@#

TFrmEinstellungen -> this is not shown
LbALTage - > this is shown

Any suggestion?
isiticov
Site Admin
Posts: 2385
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

May be you have SIL file entries for base form but not for inherited? Since inherited forms will have another type name at run-time this won't work. You need to have entries for each inherited form in SIL file as well.
Best regards,
Igor Siticov.
Thomas J.
Posts: 129
Joined: Fri Jan 06, 2006 8:09 am

Post by Thomas J. »

No as you can see both captions are from the same form
TFrmEinstellungen
and caption "Properties" is not displayed but the caption "days"
("Properties" is the caption of the form and "days" is a label caption)
isiticov
Site Admin
Posts: 2385
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

It looks like somewhere in your code you change tha form's caption. Can you reproduce the problem on sample project and send it to us?
Best regards,
Igor Siticov.
Thomas J.
Posts: 129
Joined: Fri Jan 06, 2006 8:09 am

Post by Thomas J. »

I tried the sample project but this is running fine - of course :?
I tried several other forms and it is not possible to change the title of the form, all other caption are changed.
But the one form which changes the caption is designed like each other form.
I only can send you the dfm file. In the cpp file is nothing implemented with your components.
isiticov
Site Admin
Posts: 2385
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Actually, the DFM file wont' give us anything because as you noted the sample projects work fine and this means that maybe some your code is the origin of the problem. If you try to build the sample project that uses the similar way you used in your application to deal with TsiLang. Then it may give you an idea what's wrong in case it will work, otherwise you could send it to us and we will investigate.
Best regards,
Igor Siticov.
Thomas J.
Posts: 129
Joined: Fri Jan 06, 2006 8:09 am

Post by Thomas J. »

I have now an example where nothing is working.
Where can I send this example?

Thanks for your help
isiticov
Site Admin
Posts: 2385
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Great! :) Please send it to support_at_sicomponents_dot_com
Best regards,
Igor Siticov.
isiticov
Site Admin
Posts: 2385
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Hello,

We've sent you the modified sample project which works as designed. Please note the following:
1. IsInheritedOwner must be set ONLY for TsiLangs on inherited forms but not for TsiLangs on base form.
2. You must re-open inherited forms in case you changed the name of any component (in this case TsiLang) on base form, because C++Builder must reuild the "inheritance". (You change the name of TsiLang on base form but on inherited form it was still old).
3. When you switch language using TsiLangDispatcher you MUST set LangDispatcher property of all TsiLangs in project to this dispatcher component. Otherwise it won't work.

Please let me know if this helps.
Best regards,
Igor Siticov.
isiticov
Site Admin
Posts: 2385
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Also some general tips:
1. Why do you use SIL file? SIB files are much faster and stable than SIL.
2. Why do you use TsiLangRT components? If you need to be able to create application translatable by end-users you may take a look at this article: http://www.tsilang.com/press/en/creatin ... users.html It is not needed to use built-in editor for each form. SIL Editor is much more useful and powerful for editing translations.
Best regards,
Igor Siticov.
Thomas J.
Posts: 129
Joined: Fri Jan 06, 2006 8:09 am

Post by Thomas J. »

I tried the SIB file descibed in the sample. But it is not running. Could you please check your mail, thanks
Thomas J.
Posts: 129
Joined: Fri Jan 06, 2006 8:09 am

Post by Thomas J. »

Regarding the sil file I can tell you the following:

If I change during the runtime the caption of the selected language in the editor nothing changed, but if I start the app again the changed caption is shown. This behavoir is NOT like the captions of the labels .
If I select the other languages the form caption never change.

But anyway I only want to have a running app, so I try SIB due to the crazy problem with the SIL file.
Right now I'm very frustrated and I cannot understand where the problems are.
isiticov
Site Admin
Posts: 2385
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

I've sent you the modified SIB in reply of your email with new sample which works just fine.
Best regards,
Igor Siticov.
Thomas J.
Posts: 129
Joined: Fri Jan 06, 2006 8:09 am

Post by Thomas J. »

Thanks a lot it's working. I will now change my app.
Isit possible that my customer can translate the sib file? In case of how? Which app/files he needs?
isiticov
Site Admin
Posts: 2385
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Hi,

http://www.tsilang.com/press/en/creatin ... users.html

And he needs just SIL Editor (freely redistributable) and of course your SIB file.
Best regards,
Igor Siticov.
Post Reply