SiComponents Home Page SiComponents Forums
Here you will be able to get help and share your experience
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Erratic behaviour on change of language
Goto page 1, 2  Next
 
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite
View previous topic :: View next topic  
Author Message
James Campion



Joined: 27 Jan 2005
Posts: 23

PostPosted: Thu Aug 31, 2006 10:17 am    Post subject: Erratic behaviour on change of language Reply with quote

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?
Question

Regards
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Thu Aug 31, 2006 12:44 pm    Post subject: Reply with quote

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:
function ReplaceStr(const S, SrcH, Replace: string; const DoAll: Boolean):
  Tstring;

3. Replace lines:
Code:
  Result := '';
  repeat
    I := AnsiPos(SrcH, Source);

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

4. Re-compile your project.
Please let me know if this helps.
Back to top
View user's profile Send private message
James Campion



Joined: 27 Jan 2005
Posts: 23

PostPosted: Thu Aug 31, 2006 1:44 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Thu Aug 31, 2006 1:49 pm    Post subject: Reply with quote

Could you please check if the SIL file contains proper translations?
Back to top
View user's profile Send private message
James Campion



Joined: 27 Jan 2005
Posts: 23

PostPosted: Thu Aug 31, 2006 2:09 pm    Post subject: Reply with quote

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

jim
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Thu Aug 31, 2006 2:22 pm    Post subject: Reply with quote

No, I mean: are French translations correct if you open it in SIL Editor?
Back to top
View user's profile Send private message
James Campion



Joined: 27 Jan 2005
Posts: 23

PostPosted: Thu Aug 31, 2006 2:42 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Thu Aug 31, 2006 2:55 pm    Post subject: Reply with quote

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. Sad
Please let me know if this helps.
Back to top
View user's profile Send private message
James Campion



Joined: 27 Jan 2005
Posts: 23

PostPosted: Thu Aug 31, 2006 3:08 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Thu Aug 31, 2006 4:09 pm    Post subject: Reply with quote

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%.
Back to top
View user's profile Send private message
James Campion



Joined: 27 Jan 2005
Posts: 23

PostPosted: Fri Sep 01, 2006 10:48 am    Post subject: Reply with quote

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. Very Happy

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.
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Fri Sep 01, 2006 11:01 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
James Campion



Joined: 27 Jan 2005
Posts: 23

PostPosted: Fri Sep 01, 2006 11:05 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
isiticov
Site Admin


Joined: 21 Nov 2002
Posts: 2102

PostPosted: Fri Sep 01, 2006 11:58 am    Post subject: Reply with quote

Actually, we don't have clear time-line now, so I would answer the ETA would be "when it will be ready" (C) Smile. 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.
Back to top
View user's profile Send private message
James Campion



Joined: 27 Jan 2005
Posts: 23

PostPosted: Mon Sep 04, 2006 10:19 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SiComponents Forums Forum Index -> TsiLang Components Suite All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by p h p B B  © 2001, 2005 p h p B B  Group