使用方法Qt Linguist

应用程序中需要翻译的文本大多由单词或短语组成。这些文本通常显示为窗口标题、菜单项、工具提示以及按钮、复选框和单选按钮的标签。

您可在 QML 和 C++ 源代码中将短语标记为可翻译。Qt 本地化工具会为每个短语提供上下文信息,以帮助翻译人员理解其含义。您可以为短语添加注释。

翻译文件包含应用程序中所有用户可见的文本和键盘快捷键,以及这些文本的翻译。

创建新项目时,可以自动生成一种语言的翻译源文件 (TS)。要添加其他语言,请编辑项目文件或访问File >New File

要在Qt Linguist 中打开 TS 文件,请右键单击ProjectsFile System 视图中的 TS 文件,然后转到Open With >。 Qt Linguist在上下文菜单中打开。

另请参阅 添加翻译文件Qt XML 的国际化Qt Linguist 手册

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.