Qt Extended Home · Build System Home · Reference · User Guide · Internals codeless banner

Non-code Translatables

Non-code translatables are processed with nct_lupdate. This script can extract data from the following formats:

A translatable settings file looks like this:

    Comment[Desktop Entry/Name]=Use soft hyphen (char U00AD) to indicate hyphenation
    [Desktop Entry]
    Comment[]=A Calendar and Scheduling Program

This example is datebook.desktop. The important parts are the [Translation] section and the Var[]=Value lines.


This line instructs the build system to store the translations in a file called QtopiaApplications.ts. The files in Qt Extended are generally stored in a few global .ts files but third party applications will need to use their own files.


This line specifies the context to use for the translations. When QObject::tr() is called an implicit context is used but QApplication::translate() allows the context to be set. This must be somewhat unique so that translators do not have to deal with unrelated strings when translating content.

    Comment[Desktop Entry/Name]=Use soft hyphen (char U00AD) to indicate hyphenation

This line will put a comment in the .ts file for translators. In this case, the value Name in the [Desktop Entry] section is given a comment.


When Qt Extended reads this value, it will try to translate it.

See also Overviews, hint=nct, and Internationalization (build system).

Copyright © 2009 Nokia
Qt Extended - Build System Documentation