問題描述
你知道編輯/翻譯資源(.rc)文件的好程序嗎? (Do you know of a good program for editing/translating resource (.rc) files?)
我正在多語言環境中構建 C++/MFC 程序。我有一種主要(國家)語言和三種國際語言。每次我向程序添加功能時,我都必須使國際語言與國內語言保持同步。Visual Studio 中的資源編輯器不是很有幫助,因為我經常會留下未翻譯的字符串、對話框等。
我想知道你們是否知道可以編輯資源(.rc)的程序) 文件和
- 構建一個文件,其中僅包含要翻譯的字符串及其各自的ID,並接受另一種語言的相同(或相似)文件(這將很有幫助,因為通常翻譯是由其他人完成),或
- 自行處理翻譯,
參考解法
方法 1:
Check out Lingobit Localizer. Expensive, but well worth it.
方法 2:
Here's a script I use to generate resource files for testing in different languages. It just parses a response from babelfish so clearly the translation will be about as high quality as that done by a drunken monkey, but it's useful for testing and such
for i in $trfile do key=`echo $i | sed 's/^\(.*\)=\(.*\)$/\1/g'` value=`echo $i | sed 's/^\(.*\)=\(.*\)$/\2/g'` url="http://babelfish.altavista.com/tr?doit=done&intl=1&tt=urltext&lp=$langs&btnTrTxt=Translate&trtext=$value" wget ‑O foo.html ‑A "$agent" "$url" *&> /dev/null tx=`grep "<td bgcolor=white class=s><div style=padding:10px;>" foo.html` tx=`echo $tx | iconv ‑f latin1 ‑t utf‑8 | sed 's/<td bgcolor=white class=s><div style=padding:10px;>\(.*\)<\/div><\/td>/\1/g'` echo $key=$tx done rm foo.html
方法 3:
Check out appTranslator, its relatively cheap and works rather well. The guy developing it is really responsive to enhancement requests and bug report, so you get really good support.
方法 4:
You might take a look at Sisulizer http://www.sisulizer.com. Expensive though. We're evaluating it for use at my company to manage the headache of ongoing translation. I read on their About page that the company was founded by people who left Multilizer and other similar companies.
方法 5:
In my experience, internationalization requires a little more than translating strings. Many strings when translated, require more space on a dialog. Because of this it's useful to be able to customize the dialogs for each language. Otherwise you have to create dialogs with extra space for the translated strings which then looks less than optimal when displayed in English.
Quite a while back I was using a translation tool for an MFC application but the company that produced the software stopped selling it. When I tried to find a reasonably priced replacement I did not find one.
(by djeidot、On Freund、Joe、titanae、Larry Silverman、jmatthias)
參考文件