Erratic behaviour on change of language

All announcements, questions and issues related to the TsiLang Components Suite.
James Campion
Posts: 23
Joined: Thu Jan 27, 2005 3:13 pm

Erratic behaviour on change of language

Post by James Campion »

Hi, I have a strange problem I hope someone can help me with.

I have implemented siLang with our main program which now runs in 5 languages incl. Russian and chinese.
I have a very simple menu program that runs when the software is inserted. It can be run in the 5 languages as well. The interface consists of Tlabels and a comboBox and runs as it should when I test it. Problem is when the program & the exeternal Sil file is sent to a customer in China it runs erratically. Most ( not all ) of the labels aren’t translated to the selected language.
If French is selected Chinese character appear with the text.

The sil file was through from the SiLang component’s export function.

Any idea what causes this on a Chinese PC and not my own?
:?:

Regards
Jim.C
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Hi,

There is a problem in Delphi code when working with delimited strings on Chinese locale. This will be fixed in next version. In order to implement this fix on your side please do the following:
1. Open siComp.pas unit
2. Find the procedure

Code: Select all

function ReplaceStr(const S, SrcH, Replace: string; const DoAll: Boolean):
  Tstring;
3. Replace lines:

Code: Select all

  Result := '';
  repeat
    I := AnsiPos(SrcH, Source);
with the following:

Code: Select all

  Result := '';
  repeat
    I := SearchBM(SrcH, Source);
4. Re-compile your project.
Please let me know if this helps.
Best regards,
Igor Siticov.
James Campion
Posts: 23
Joined: Thu Jan 27, 2005 3:13 pm

Post by James Campion »

After the correction I recompiled the package and rebuilt my project, however the result was the same.

I am using Delphi 7 and have installed the
TsiLang Components Suite 6.0.2 released recently.

regards
jim
Jim.C
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Could you please check if the SIL file contains proper translations?
Best regards,
Igor Siticov.
James Campion
Posts: 23
Joined: Thu Jan 27, 2005 3:13 pm

Post by James Campion »

Yes the sil file is fine regarding, chinese characters and the Russian.
Chinese = Tahoma & GB2312_Charset

jim
Jim.C
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

No, I mean: are French translations correct if you open it in SIL Editor?
Best regards,
Igor Siticov.
James Campion
Posts: 23
Joined: Thu Jan 27, 2005 3:13 pm

Post by James Campion »

No there appears the odd Chinese character in both the German and French columns. This is of course on the the PC with Chinese locale.
Jim.C
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

If the same SIL file looks good in SIL Editor on German OS but wrong on Chinese then it must work OK in your project with the fix above. If it still doesn't work then you can try to convert it to SIB and configure your project to use SIB instead of SIL (to convert use SIL Editor menu File|Export)
If this SIL file looks wrong in SIL Editor on both German and Chinese OS then it is corrupted and must be re-created. :(
Please let me know if this helps.
Best regards,
Igor Siticov.
James Campion
Posts: 23
Joined: Thu Jan 27, 2005 3:13 pm

Post by James Campion »

All translations columns are okay when the PC (danish OS) is not setup to Chinese locals. You previous question was spot on, it is only the french column that has sporadic chinese characters. So the sil file is okay.

I will try to convert to a SIB file as you suggested.

Shouldn't there also be a problem with our main software as well?

regards
jim
Jim.C
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Yes, then SIL file is fine.
Actually, the fix above must solve the problem in your projet, but if you recompiled it with new changes and it still doesn't work we must investigate deeper. Because this worked fine on our side.
Converting SIL to SIB will solve this 100%.
Best regards,
Igor Siticov.
James Campion
Posts: 23
Joined: Thu Jan 27, 2005 3:13 pm

Post by James Campion »

That seemed to do the trick, I am awaiting confirmation from our Chinese customer.
Thanks very much for your prompt attention... incredible support rare these days. :D

2 questions
I am confused as to why he hasn't mentioned any similar problem with our main software system which he has tested.

Shouldn't it be affected as well? Do I have to convert to a SIB file here as well?

Thanks again.
Jim.C
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Yes, your main software should be affected as well and it is strange he didn't notice this. So I would suggest to convert it to SIB usage.
Best regards,
Igor Siticov.
James Campion
Posts: 23
Joined: Thu Jan 27, 2005 3:13 pm

Post by James Campion »

Which leads me to ask. When will the next release come with the fix?
We can maybe wait, thus avoiding the change to a Sib file.

regards
Jim.C
isiticov
Site Admin
Posts: 2383
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Actually, we don't have clear time-line now, so I would answer the ETA would be "when it will be ready" (C) :). But hopefully in September-October it will be released.
Converting to SIB is still recommended since SIB is better that SIL in many points.
But! the main question is: does your small re-compiled EXE with our fix applied still shows incorrect behavior under Chinese OS? If this is the case then we must re-fix our sources as well.
Best regards,
Igor Siticov.
James Campion
Posts: 23
Joined: Thu Jan 27, 2005 3:13 pm

Post by James Campion »

Hi Igor, it works fine according to our chinese customer.

Now that I am forced to convert to a SIB file as well for our main program, I have a question before using too much time and also a problem generating the Sib file from the expert.

Question.
Our software is distributed with several sil files and hidden keys which open up for the languages in the sil files. The choice of languages is dependent upon both the Sil file and the key.

On startup I open the Sil file count and load the languages. The key then determines what languages are displayed in the SiCombo.

It works fine with the Sil file so I assume this is also the case with a Sib file.


Probrem :
When I start up the Lang Expert in my project and ”load project” from the Sib file, which was created from the original Sil, the main form is not imported.
It is listed in the SIB file but not in the Tsilang Expert dialog box list.

I have a TsilLang component on all forms pointing to a commone dispatcher.
Jim.C
Post Reply