Qt C++ QTranslator tutorial

qtlanguistIn this (video) tutorial I go through the steps and tools involved in the process of writing international applications with the Qt toolkit.By the end ,you will be able to effectively use lupdate ,lrelease and Qt Languist to write an app that runs in english ,french and chinese!The video can be accessed through the links below: (Youtube and Youku).

Youtube Video

Youku Video

Command Summary:

To generate a french ts file for your project issue the follwing command:

lupdate -pro Translatortute.pro -ts french.ts

Translate the file using Languist and save.To generate a qm file from the ts file issue the following command:

lrelease french.ts

And the qm files are generated.Import qm files in Qt Creator, load QTranslator objects with your qm files ,install QTranslator to the application and BOOOM! You’re done.

Posted in Programming, Tutorials and tagged , , .

Daniel Gakwaya loves computer Hardware/Software.He is a Software Engineer at BLIKOON and lead developer of bliboard-The whiteboard system currently marketed by the company.He is known to hack around on any piece of tech that happens to pick his interest. More on his tech endeavors here
Follow him on Twitter

2 Comments

  1. If you need to programatically insert translations into a QTranslator , this function can be reimplemented.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.