Only font is changing but not the language

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

Only font is changing but not the language

Post by Thomas J. »

Hello support,
I use your component with SIB a file. I translated only the caption for german and english.
So I start my app open the form "Erinnerung" open my form where I can change the language and switch to english.
Now the font has changed but not the title which is tranlated as "Reminder".

I close the app and start again. But now first switch to english and then open the form "Erinnerung" and now is written "Reminder". If I want now switch back to german only the font is chaned but not the caption text to "Erinnerung".

I implemented an event for ChangeLanguage to check if the form get the change. And the component of the form "Erinnerung" is getting the event, but the caption is not changing. :roll:
isiticov
Site Admin
Posts: 2416
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Please send us the sample project that reproduces this. Since it is quite difficult to see what caused such behavior. Does the same appear without SIB file usage?
Best regards,
Igor Siticov.
Thomas J.
Posts: 129
Joined: Fri Jan 06, 2006 8:09 am

Post by Thomas J. »

Without SIB file nothing is changed. No font no language.
I will try to send you an example.
Thomas J.
Posts: 129
Joined: Fri Jan 06, 2006 8:09 am

Post by Thomas J. »

I sent you the sample project
isiticov
Site Admin
Posts: 2416
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Please see my reply on your email.
Best regards,
Igor Siticov.
Thomas J.
Posts: 129
Joined: Fri Jan 06, 2006 8:09 am

Post by Thomas J. »

So now I know more about the problem.
I have open 3 forms
- Main
- Option form caption (Optionen) where I can switch the language
- Reminder form with caption (Erinnerung)

I switch from German to english
- The titles of the main form are switching to english
- the caption of the form Option change to "Options" and also the labels
- the caption of the form Erinnering does NOT change, but the labels e.g. of the grid

No I open another form and currently I have still selected English
I open the form Terminkalender and the caption is not Terminkalender it is Event calendar.

Now I change back to German language.
All labels are changing, but all caption are still the same with exception of the Option form. So Reminder form has caption Erinnerung and Event calendar has still the english caption.

Ahhhhh

:roll:
isiticov
Site Admin
Posts: 2416
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

I'm sorry, but your description doesn't help to find the problem at all. It is 90% very likely that the problem somewhere with your project, files or so.
Since the sample project EXE you sent us works just fine and suddenly "started" to work just fine on your side as well.
Best regards,
Igor Siticov.
Thomas J.
Posts: 129
Joined: Fri Jan 06, 2006 8:09 am

Post by Thomas J. »

New hint. If I create in my live project a form which is based on the same form as the Reminder form which is not working correct regarding the caption everything is working fine!

So the problem is something in your component. I deleted all stuff from your component (caption, String, etc.) press the button in the IDE to get everthing back from the base form. I thought I would have the same config for your component like for the new form, but without changes.
So something is stored in the old forms regarding your component which is the reason for this.
isiticov
Site Admin
Posts: 2416
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

If the problem is in TsiLang it would be reproducible on new forms. But you're strangely enough unable to reproduce it anywhere else. Just check ALL the properties of TsiLangs on both forms working and non-working and this might help you to identify the problem.
Best regards,
Igor Siticov.
Thomas J.
Posts: 129
Joined: Fri Jan 06, 2006 8:09 am

Post by Thomas J. »

:P Now I know where the problem is. I will check it and let you know.

Anyway it is on my side and not in your component and has something to do with action which are linked to a form.

I'll back on Monday
Thomas J.
Posts: 129
Joined: Fri Jan 06, 2006 8:09 am

Post by Thomas J. »

So the problem was that I used the SetAction method of the form like:
SetAction(Main->AcEventCalendar);
I overlaoded the Set and GetAction method and due to this I could access the method. Now I added a new method so that the Action is empty.
And with the empty Action the caption is correct changed.

FYI
If I call
MainDataModule->LgDisp->ActiveLanguage = CbSprache->ItemIndex + 1;

the GetAction method is called, the rest you should know. I assume that the Caption of the Action is used for the Caption of the Form. So your component translated the Caption correct and later on the GetAction was called and the Caption was set back.

Right now I didn't translated the Action components. If I will do in future I think it would also work, but anyway I used the SetAction in a wrong manner.
Post Reply