文件扩展名 |
.qph |
API 扩展 |
qph |
导入 |
是 |
导出 |
是 |
复数形式支持 |
否 |
描述支持 |
否 |
Qt phrase Book 是基于 XML 的文件格式,供 Qt 语言专家填充预翻译内容。其单位元素是 <短语>
,有一个嵌套的<原文/源语>
和<译文>
元素。
Qt phrase Book (.QPH) 与 Qt 翻译原文/源语=%(.TS) 不同,.QPH 是术语表,.TS 是交换文件格式。.TS 由 Qt 应用程序用于将本地化内容加载到软件中,.QPH 在 Qt 译员中用作术语库。
代码示例
<!DOCTYPE QPH> <QPH language="en-GB"> <phrase> <source>boolean_key</source> <target>--- true </target> </phrase> <phrase> <source>empty_string_translation</source> <target/> </phrase> <phrase> <source>key_with_description</source> 译文>我是此键非常重要的描述!(至少在某些格式下)</译文> </phrase> <phrase> <source>key_with_line-break</source> 译文>此翻译包含 换行符。</译文> </phrase> <phrase> <source>nested.deeply.key</source> 译文,这个键的嵌套更深。译文> </phrase> <phrase> <source>nested.key</source> 译文>键嵌套在命名空间内。</译文> </phrase> <phrase> <source>null_translation</source> <target/> </phrase> <phrase> <source>pluralized_key_one</source> 译文>只找到一只小猫。译文> </phrase> <phrase> <source>pluralized_key_other</source> <译文>哇,您有 %s 只小猫!</译文> </phrase> <phrase> <source>pluralized_key_zero</source> 译文>您没有小猫。</译文> </phrase> <phrase> <source>sample_collection</source> <target>--- - 第一项 - 第二项 - 第三项 </target> </phrase> <phrase> <source>simple_key</source> 译文>简单的键,简单的信息,如此简单。</译文> </phrase> <phrase> <source>unverified_key</source> <译文>此翻译尚未验证并等待。“此翻译尚未验证并等待。(在某些格式中,我们也导出此状态)</译文> </phrase> </QPH>