| Classes | Functions | DevRef | Qt API | Qtopia Documentation | ![]() |
Internationalizing Qtopia software is much the same as internationalizing any Qt-based software. See the Qt i18n documentation. You should be familiar with that documentation, the tr() macros, Qt Linguist, and the internationalization process in general before you proceed with this document.
The process of internationalization produces Qt message files (.qm files). For applications, these files must be placed as follows:
/opt/Qtopia/i18n/language/appname.qm
The language is an ISO 639 language code, and appname is the application executable filename.
For plugins, which are shared libraries, the files must be placed in the following directory:
/opt/Qtopia/i18n/language/pluginname.qm
The pluginname is the filename of the plugin shared object, without any extensions, but including "lib" if the plugin includes that prefix.
Locales suffixes are supported - so for example, your application may use British English, and then have a /opt/Qtopia/i18n/en_US/appname.qm file specifying some changes for American English. Translations with locale suffixes take precedence over translations without such suffixes.
Desktop files (eg. /opt/Qtopia/apps/Application/appname.desktop) follow the standard for those files - each value in the file can be internationalized. For example, the texteditor.desktop file begins like this:
[Desktop Entry] Comment=A Text Editing Program Exec=textedit Icon=TextEditor Type=Application MimeType=text/* Name=Text Editor Name[no]=Teksteditor Name[de]=Texteditor
These files are encoded in UTF-8.
On-line documentation for applications is written in the HTML subset supported by the Qt richtext widget. Such documentation files must be placed as follows:
English documentation:
/opt/Qtopia/help/html/appname-suffixes.html
Non-English documentation:
/opt/Qtopia/help/language/html/appname-suffixes.html
The -suffixes is optional. It always starts with "-" to avoid namespace conflicts.
These files are encoded in UTF-8.
Qtopia ships with a number of supported languages. To translate it to an additional language, you must perform the translation process described above for all the application, desktop files, and help documentation which you wish to have in the additional language. Additionally, you will need to translate the library texts, which are found in:
/opt/Qtopia/i18n/language/libqpe.qm
Qt Linguist supports incremental translation, which helps you keep track of any additional content which is added to Qtopia that needs translation.
Copyright © 2001-2002 Trolltech | Trademarks | Qtopia version 1.5.0
|