发布管理器
发布管理器使用lupdate
从应用程序源文件(QML 和 C++)中生成一组翻译源 (TS) 文件,并将其传递给翻译人员。翻译人员使用Qt Linguist 翻译字符串,并将 TS 文件传回发布管理器。他们使用lrelease
生成 TS 文件的精简版本,称为 Qt XML 消息 (QM) 文件,可供应用程序使用。
随着应用程序的变化和发展,您可以反复循环使用这些工具。它们可以保留现有的翻译,并方便识别新字符串。此外,您还可以使用Qt Linguist 短语集来持续翻译多个应用程序和项目。
您可以配置 CMake 项目,使其在构建项目时自动运行lupdate
和lrelease
,并为您生成 TS 和 QM 文件。
© 2025 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.