venerdì 25 febbraio 2011

How to Translate Sankorè

Here a little how to for translate Sankorè 3.1. First of all you should download the code from the adullact.net site and install the qt development tools for your operating system (http://qt.nokia.com/downloads). Pay attention at the fact that on Windows operating system the used qt development library is the VS2008 version and not the minGW library version.

Here began the process to translate the Sankorè application. First of all check if the language you are interesting in is in the project file.
Open Sankore_3.1.pro file with an editor and look for the TRANSLATIONS entry. Verify that the TRANSLATIONS list contains such an entry:

resources/i18n/sankore_TWO_CHARACTERS_LANGUAGE_CODE.ts

where the TWO_CHARACTERS_LANGUAGE_CODE is the language code you want to translate.
For example french translation need a resources/i18n/sankore_fr.ts entry.

The second step consists on extracting the strings list that has to be translated. This is easily done using the lupdate command from the root project directory:
lupdate -no-obsolete Sankore_3.1.pro.

At this point open the translation file (sankore_TWO_CHARACTERS_LANGUAGE_CODE.ts) with QT Linguist (easiest way) or edit it with your preferred editor. It is located in ROOT_PROJECT_DIRECTORY/resources/i18n/ folder.

Once the translation done execute the lrelease command from the root project directory:
lrelease Sankore_3.1.pro .
This command will create the binary file used on Sankorè 3.1 program.

Rebuild the application and the new language will be available.
That's all.

More information about the command used in this mini how to can be found on http://doc.qt.nokia.com/latest/linguist-manual.html web site.

Nessun commento:

Posta un commento