This paper describes how to build a multi-lingual application using Qt framework. Qt provides a linguist tool chain for building and supporting applications for various regions of the world. The tool chain includes tools starting from Qt Creator, lupdate, lrelease. This article provides a detailed treatment on how to use these tools to build a multi-lingual dialog box.


Qt provides QTranslator for developers to switch between language choices. QTranslator takes .qm files as input. Developers need to provide .qm files for each language that they plan to support.

The following diagram details the steps for developers to generate .qm files. The .qm files could be packaged with the application as external or internal resources. The QTranslate load function loads a specific language resource for the application.



Let’s try to make the following user interface multi-lingual. We need to translate the following strings:

  1. TranslationApp
  2. Choose Language
  3. English
  4. Hindi
  5. French
  6. Welcome



  1. Qt Creator installation
  2. Qt Linguist installation
  3. User should have basic understanding of multilingual applications.
  4. Create a widget project with name translationExample and save to disk.

Step 1- Add TRANLATIONS to application .pro file:
TRANSLATIONS += english.ts \
hindi.ts \

Step 2- Use lupdate command
Run lupdate tool on your project

Once this command is executed successfully all three .ts files (english, hindi, french) mentioned in the project file will be created on disk. Below is the sample output:




Step 3 – QT Linguist:

Open Qt linguist tool and choose the .ts file(s) from your disk, which you would like to translate. In the below image each entry is a string. The columns the three languages we choose to translate.


            Above image shows the untranslated strings after opening the .ts files in the qt linguist tool.

Step 4 – Start Translating strings:

Once each string is translated to the corresponding language the corresponding language column needs to be checked as shown below.
Step 5 – Once all the translations are complete, choose the Release All menu item under file menu.  Release All command will create the .qm files as shown below.


Step 6 – Coding

    1. Add the Qtranslator header.
    2. Create an object for the Qtranslator class.
    3. To enable the translations, all the strings in the application, need to be inside tr() function or QcoreApplication::translate().
    4. Use the load function of the qtranslator class to load the language file.


    1. Appropriate fonts have to be set to the application for the proper display. Using QFont.
    2. Use the installTranslator() of the QCoreApplication class to install the translator.


Sample Source code:

Please download the source from the below link:

Output Screenshots:

Further reading recommendations:

Along with QTranslator, Qt provides QLocale which can be used to handle currencies, date and time representations.



For any technical support or queries feel free to write to us at