Internationalization of CamiTK GUI

How to translate your user interface of your extension.

Internationalization is not officially supported by the CamiTK team, although it may work!

Change user interface language in CamiTK imp

  1. start camitk-imp application.
  2. in the “Help menu” do “Change Language” and choose a new language.
  3. close camiTK imp application.
  4. settings are modified and you can start your camiTK application with this new language.

At the moment, only a few strings are translated from English, but do feel free to contact us if you would like to help translate CamiTK in another language!

How to add translation for your extension?

Overview

As all CamiTK user interface are done in Qt, we recommend reading the overview in the Qt documentation

The language used in CamiTK source code is english, but if you want to use another language you can use the QtLinguist application to translate all the english character strings.

What is the step to install a new language translation ?

  1. in CamitkTranslate.cmake you must insert abbreviation of new language like _en_fr_de for english, french and german.
  2. run cmake (the files translate_en.ts, translate_fr.ts, translate_de.ts are created or updated for all extensions).
  3. use QtLinguist with your *.ts files to translate character string of *.cpp, *.ui, *.h files.
  4. do cmake (the file translate_en.qm, translate_fr.qm, translate_de.qm are create or update for all extensions).
  5. update the listLanguageAndFlag variable in changeLanguage.cpp to insert for the new language his name, abreviation and flag (add flag_xx.png file in png format in src\sdk\actions\application\resources\flags\16 directory)
  6. compile camitk. (then all translate_xx.qrc file are created).

How to make translation of CamiTK in other language just for one extension ?

  • open the extension CMakeLists.txt and add EXTRA_TRANSLATE_LANGUAGE with language.
camitk_extension(ACTION_EXTENSION
                 DEFINES COMPILE_APPLICATION_ACTION_API
                 CEP_NAME SDK
                 DESCRIPTION "Features actions used at application level (these actions are mandatory for any CamiTK application to work"
                 EXTRA_TRANSLATE_LANGUAGE de
)
  • go through steps 2,3,4,5,6 given above