发布管理员

显示发布操作的图标

发布管理员使用lupdate 从应用程序源文件(QML 和 C++)生成一组翻译源(TS)文件,并将其传递给翻译人员。 翻译人员使用Qt Linguist 翻译字符串,并将 TS 文件交还给发布经理。发布经理使用lrelease 生成 TS 文件的紧凑版本,即 Qt 消息(QM)文件,这些文件可直接用于应用程序。

随着应用程序的变更和演进,您可以循环使用这些工具。它们会保留现有的翻译内容,并便于识别新的字符串。此外,您还可以使用Qt Linguist 短语库,以保持多个应用程序和项目翻译的一致性。

您可以配置 CMake 项目,使其在构建项目时自动运行lupdate 和lrelease ,并为您生成 TS 和 QM 文件。

您可以使用Qt Design Studio 的“翻译”视图来测试和管理基于 ID 的翻译。

© 2026 The Qt Company Ltd. 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.