刚才到Delphi Community Home Page找了一个老外 给他写了一封信,问问,原文如下。
大家看看,如果你知道答案,就告诉我。谢谢。懒得翻译过来了。不好意思
thoth2487@hotmail.com
Dear sir:
i write a Multilanguage program with Translation Manager in Delphi 6.i need English and
chinese version. I’ve translate system string, such as system error info and text on forms.
the string variable i use has been translted and wrote into *.res file. That’s all i have
done.
I have tow problem:
*** First : System String Can Not Be Translted In Time!
NOW,my program can switch language after the program restart. I want to switch language in time,
what can i do
!!well,i know i can load string in other language resource file and evaluate it
to string variable or text on forms.BUT i CAN NOT translate system string IN TIME. that means
system string such "Disk Full" ,"Clipboard do
es not support Icons" still the original language.
how can i translate them in time???
*** Second : How to Promote the translation performance!
another question is how to promote the translation performance. you know, if i have lots of text
on forms such as Form1.Label.caption,Form2.Button1.Caption,ect ,the translation performance would
be LOW, and difficult to manage. so is there a way to solve this problem? so, I want to know
how to load resource file dynamically.
---the following is the key i image to the problem:
cos i find program set his language following this rule: 1st--Programmer's default set in design
time(NO resource file required);2nd--Operation System's Local set(resource file required);3rd---
registry set(resource file required) if resource do
es not exist,program can not load it,and
show the default langugae.if resource exist,program follow the os's local set,but resoruce file
required,or it will show default language!!the same thing will happen ,when it detect a registry
string.
I GUESS there must be a language interface for string resource. if program have decided the
language, it will load the res file as a interface, while component on form
show, it will load string through that interface. I think it is a automatic process. Well,this
process just my imagine,if it is wrong,please tell me the real process. Thanx
If that process is true,how can I change the interface in running-time. then
programmer just
need change the interface and send some process to let program refresh string’s language,
few code will be wrote,and need not evaluate EVERY strings to translate program.
Well~~
desire your reply!
mailto: taozhiyu@msn.com
homepage:http://taozhiyu.at.china.com
yours
1/15/2002