qul_target_embed_translations

Embeds translations from the .ts 文件。

概要

qul_target_embed_translations(<target> ts_file1 [ts_file2 ...]
                             [OMIT_SOURCE_LANGUAGE])
							

描述

Embeds the translations from the given .ts files in the resulting binary. Each file defines a language. The name of the language is the string between the last and second to last dot in the filename. For example: translation.fr.ts defines translations for "fr" (French).

This function also creates an update_translations target, which creates or updates the source .ts files based on the translated strings in the source QML files.

选项

可选 OMIT_SOURCE_LANGUAGE flag removes the untranslated strings from the binary. The first .ts file defines the new default language.

范例

qul_target_embed_translations(example_app translation.nb_NO.ts translation.lv_LV.ts)
							

Since

This command was introduced in Qt Quick Ultralite 1.0.

另请参阅 Qt Quick Ultralite 的国际化和本地化 .