[译]智能翻译器
By robot-v1.0
本文链接 https://www.kyfws.com/applications/smart-translator-zh/
版权声明 本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!
- 4 分钟阅读 - 1702 个词 阅读量 0[译]智能翻译器
原文地址:https://www.codeproject.com/Articles/833/Smart-Translator
原文作者:Mike Walter
译文由本站 robot-v1.0 翻译
前言
Application to aid in the language translation of another application’s resources.
应用程序,以帮助另一应用程序的资源进行语言翻译.
描述(Description)
我开始编写SmartTranslator,以便为SmartFTP的用户提供一种将其资源字符串转换为其他语言的简单方法.首先,我在网上寻找可以完成这项工作的应用程序,其中大多数都是花钱的.由于SmartFTP是免费软件,因此我不希望用户必须购买第三方产品才能进行转换.因此,SmartTranslator的想法诞生了,我开始了使用MFC的第一个项目.(I started writing SmartTranslator to provide the users of SmartFTP a simple way to translate their resource strings to other languages. First I looked on the web for an app that did this job, most cost money; since SmartFTP is Freeware, I didn’t want the users to have to pay for a third party product to be able to convert it. Thus, the idea for SmartTranslator was born and I started my first project that uses MFC.)
的(The) 智能翻译安装程序(Smart Translator Installer) 由Christian Skovdal Andersen提供.(was kindlyprovided by Christian Skovdal Andersen.)
介绍(Introduction)
SmartTranslator演示了如何提取,更新资源并将其写入可执行文件.它使用BeginUpdateResource,UpdateResource和EndUpdateResource函数,因此它将仅在Windows NT 4.0或Window 2000上工作.(SmartTranslator demonstrates how to extract, update and write resources to executables. It uses the BeginUpdateResource, UpdateResource and EndUpdateResource functions, so it will only work on Windows NT 4.0 or Window 2000.)
项目结构(Project Structure)
这些类分为逻辑部分.(The classes are split into logical parts.)
CResourceInfo(CResourceInfo) | 是任何可翻译资源项的基类(is the base class for any translatable resource item) |
---|---|
CResourceExtractor | 是提取资源的类.如果需要,您可以在此处添加自己的资源类型(is the class for extracting the resources. Here you can add your own resource types if you want) |
CResourceWriter | 是用于将翻译后的资源写回到新文件的类.将旧资源删除并写入新资源之后,首先将原始文件首先复制到新文件.(is the class for writing the translated resource back to a new file. The original file first copied to the new file after this the old resource gets deleted and the new resources are written.) |
CProject | 用于项目管理(for the Project Management) |
CDictonary | 是用于构建简单词典的类.字典中的字符串取决于类型.这意味着一个源字符串可以为每种类型具有翻译后的字符串,也可以使用公共字符串.(is the class for building a simple Dictionary. The strings in the Dictionary are type dependent. This means one source string can have a translated string for each type or can use a common string.) |
注意:字典目前无法编辑.您可以使用词汇表导入某种类型的文本.词汇表可从ftp.microsoft.com下载.(Note: the dictionary is not editable at this time. You can import some type of text using Glossary. Glossary is downloadable from ftp.microsoft.com.) |
要求(Requirements)
- 您必须安装BCG控件库才能编译和使用此代码.你可以得到它(You have to install the BCG Controls Library to compile and use this code. You can get it) 这里(here) .(.)
- 由于API要求,请在Windows NT4.0或Windows 2000下使用.(For Use under Windows NT4.0 or Windows 2000 due to API requirements.)
- 您还需要向VC ++中的"工具/选项/目录"中添加BCG bin目录和BCGCB源目录的目录路径,分别使用库/DLL和头文件.(You will also need to add to your Tools/Options/Directories in VC++ the directory paths to the BCG bin directory and the BCGCB source directory from which libraries/DLLs and header files are used respectively.)
- 需要安装最新的Platform SDK才能正常工作.(Requires the latest Platform SDK installed for compilation to work correctly.)
谢谢(Thanks To)
- Stas Levin出色的BCG控制库(Stas Levin for his great BCG Control Library)
- Norm Almond和David Wulff用于Office2000文件打开/保存对话框.(Norm Almond and David Wulff for the Office2000 File Open/Save Dialog.)
- Ashley Laurent用于CChartWnd控件(Ashley Laurent for the CChartWnd Control)
- Wine项目的开发人员,这始终是获取有关Windows编程信息的好地方.(The Developers from the Wine project, which is allways a good place to get some information about windows programming.)
更新(Updates)
2000年11月27日(November 27,2000)- 文件格式更改旧项目文件不再起作用(File Format changes old project file not longer working)
- 更新资源现在可用于版本信息(Update resources works now for Version Informations)
- 固定的memleak Office2000Dlg(Fixed memleak Office2000Dlg)
- 版本更新现在使用原始代码页(Version Updates now uses the orginal codepage)
- 其他一些修复(some other fixes)
许可
本文以及所有相关的源代码和文件均已获得The Code Project Open License (CPOL)的许可。
C++ VC6 Windows Win2K MFC Visual-Studio Dev 新闻 翻译