| Qtopia Home · Home · Reference · User Guide · Internals | ![]() |
When Qtopia is configured there are two important variables that are set.
Set to include all detected languages. This variable is used by make lupdate to create .ts files for projects. Third party projects that wish to target a specific set of languages should set this variable.
Set to include all selected languages. This corresponds to the -languages switch accepted by configure. This variable is used to install .directory files which tell Qtopia that a given language is available.
The build system uses the TRANSLATABLES variable to help facilitate a single set of translations across a number of products and configurations. Conditional source should be added to the TRANSLATABLES variable even if the condition is false.
Qtopia currently assumes that strings are written in the en_US language. Because of this assumption the build system sets STRING_LANGUAGE to en_US. The build system's internal variables TRANSLATIONS and ALL_TRANSLATIONS are set from LANGUAGES and AVAILABLE_LANGUAGES but without the value in STRING_LANGUAGE. This happens just after the .pro file is read so that any changes to LANGUAGES and AVAILABLE_LANGUAGES in the .pro file are taken into account.
# Set TRANSLATIONS and ALL_TRANSLATIONS
TRANSLATIONS=$$LANGUAGES
TRANSLATIONS-=$$STRING_LANGUAGE
ALL_TRANSLATIONS=$$AVAILABLE_LANGUAGES
ALL_TRANSLATIONS-=$$STRING_LANGUAGE
While it is generally assumed that STRING_LANGUAGE is both available and selected this does not have to be the case. Qtopia can be configured without support for en_US.
Third party apps will most likely have translations available for a different set of languages than what the SDK ships with. They should specify these translations like this.
# Specify the languages that make lupdate should produce .ts files for
AVAILABLE_LANGUAGES=en_US
# Specify the langauges we want to install translations for
LANGUAGES=$$AVAILABLE_LANGUAGES
See also Overviews, hint=nct, Non-code Translatables, and Internationalization.
| Copyright © 2008 Nokia | Qtopia Build System Documentation |