Multi-language support

In this section, you will learn how to create applications that support multiple languages using the Qt framework. In fact, it all comes down to a single class that is extremely easy to use. The QTranslator class is the main Qt class responsible for handling internationalization of output (displayed) text. You simply need to make sure of the following:

  1. Use a default language (English, for instance) while you are building your project. This means, simply use sentences and words in the default language for everything that is displayed.
  2. Make sure all literal sentences in your code, or to be specific, all literal sentences that need to be translated when a different language is selected are embraced in a tr() function. ...

Get Computer Vision with OpenCV 3 and Qt5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.