Qt Linguist 示例

国际化是 Qt Core 的核心功能之一。这些示例展示了如何在运行时访问翻译和本地化功能。

Arrow Pad Example

理解“Qt Linguist ”上下文概念并使用两种或多种语言。

Localized Clock Example

该示例展示了在 CMake 和Qt Quick 中使用 Qt 翻译和本地化功能的最佳实践,包括处理不同语言中的复数形式,以及本地化的时间和日期格式。

Localized Clock with ID-based Translation

该示例展示了在 CMake 和Qt Quick 中使用 Qt 基于 ID 的翻译功能的最佳实践,包括处理不同语言中的复数形式以及本地化的时间格式。

Localized Clock with Runtime Language Switch

该示例演示了在 CMake 和Qt Quick 中使用 Qt 翻译和本地化功能的最佳实践,特别是如何在运行时更改应用程序的语言。它扩展了更简单的“本地化时钟示例”。

Troll Print Example

为后续版本更新翻译内容。

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