Qtopia Home · Home · Reference · User Guide · Internals

Translating Categories

System categories are translated. To provide the translations you need to create a non-code translatable file. The file should look like this.

    [Translation]
    File=Categories-myapp
    Context=Categories
    [Categories]
    com.mycompany.myapp.mysystemcategory[]=My System Category
    com.mycompany.myapp.anothercategory[]=Another System Category

The File entry must be unique. Using the name of the application binary is recommended (since the application binary must also be unique). Note that the text to be translated is all that is required in the [Categories] section.

    com.mycompany.myapp.mysystemcategory[]=My System Category

Given this line a translation for My System Category will be made. There is no link made between it and the string com.mycompany.myapp.mysystemcategory. There must be something before []= for nct_lupdate to parse the file and it is convenient to list the category id with the translatable text but you are not required to do so. The following is equally valid.

    1[]=My System Category
    2[]=Another System Category

Once you have a file with translations you will need to tell the build system about it. Create an install rule like this to do so.

    categories.files=categories.conf
    categories.trtarget=Categories-myapp
    categories.hint=nct
    INSTALLS+=categories

Note that the .trtarget must match the File entry in the file.

See also Tasks, Internationalization (build system), Non-code Translatables, and System Categories.


Copyright © 2008 Nokia Qtopia Build System Documentation