All announcements, questions and issues related to the TsiLang Components Suite.
sysdba
Posts: 16 Joined: Wed Nov 30, 2005 9:30 am
Post
by sysdba » Mon Dec 05, 2005 1:35 pm
Hi,
I have 3 languages :
English
French
Chinese
When doing this (Chinese language is the ActiveLanguage) :
MyTntEditControl.Text:=MyTranslationDataModule.MySilang.getTextW('mystring');
The Text is : ÄÚÈÝ/Îı¾
Instead of :梓尨妏蚚氪
Why ?
Thanks
isiticov
Site Admin
Posts: 2385 Joined: Thu Nov 21, 2002 3:17 pm
Post
by isiticov » Mon Dec 05, 2005 2:16 pm
Because Datamodule doesn't have any font/charset information. TsiLang uses that to perform Ansi to WideString conversion. So the solution could be to convert datamodule to form and assign charset for Chinese. Actually, datamodule is quite similar to usual form that is not visible.
Best regards,
Igor Siticov.
sysdba
Posts: 16 Joined: Wed Nov 30, 2005 9:30 am
Post
by sysdba » Mon Dec 05, 2005 2:31 pm
It will be very interested to store strings in unicode or UTF8 Format into TsiLang Editor...
No ?
Thanks
sysdba
Posts: 16 Joined: Wed Nov 30, 2005 9:30 am
Post
by sysdba » Mon Dec 05, 2005 3:14 pm
I Have transfered my strings from the datamodule to a form and now question marks are displayed : ??
instead of th echinese string
?
Thanks
isiticov
Site Admin
Posts: 2385 Joined: Thu Nov 21, 2002 3:17 pm
Post
by isiticov » Mon Dec 05, 2005 3:17 pm
How did you transferred them? You can just copy and paste the whole TsiLang itself and this must work fine.
Best regards,
Igor Siticov.
sysdba
Posts: 16 Joined: Wed Nov 30, 2005 9:30 am
Post
by sysdba » Mon Dec 05, 2005 3:23 pm
I have added the strings in the existing Tsilang component located on my main form
sysdba
Posts: 16 Joined: Wed Nov 30, 2005 9:30 am
Post
by sysdba » Mon Dec 05, 2005 3:49 pm
OK I Find it,
I use
THackControl(MyControl).Text := siLang.GetTextW(...)
wich is a String instead of
TTntEdit(MyControl).Text := siLang.GetTextW(...)
wich is a WideString
Thanks igor
isiticov
Site Admin
Posts: 2385 Joined: Thu Nov 21, 2002 3:17 pm
Post
by isiticov » Mon Dec 05, 2005 3:49 pm
Did you use Copy/Paste or typed them directly? Do you have Charsets settings on main form and under Default Fonts (Translation Editor menu Tools->Default Fonts) for Chinese language?
Best regards,
Igor Siticov.
sysdba
Posts: 16 Joined: Wed Nov 30, 2005 9:30 am
Post
by sysdba » Mon Dec 05, 2005 3:54 pm
See my previous post
(It seems that we have posted messages at the same time )
Thanks igor
isiticov
Site Admin
Posts: 2385 Joined: Thu Nov 21, 2002 3:17 pm
Post
by isiticov » Mon Dec 05, 2005 3:59 pm
Yes, looks like posted at the same time
Best regards,
Igor Siticov.