示例

以下示例说明了如何为翻译准备 Qt 应用程序:

  • Arrow Pad是一个 C++ 应用程序,它演示了如何使应用程序根据当前语言加载翻译。它还展示了tr() 的双参数形式的使用,该形式可为翻译提供额外信息。
  • Troll Print是一个 C++ 应用程序,演示了如何在同一上下文中区分相同的源文本。它还展示了如何在应用程序升级时尽量减少翻译工作。

© 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.