Summary

Localizing applications with Qt is easy with Qt Linguist and the localization framework in Qt. To use the framework, though, you must mark your strings to localize with tr or qsTr in your source code wherever they appear. Once you do this, you can create a source file of strings to translate with QLinguist using Qt's lupdate command and then provide translations for each string. Once you've provided the translations, you compile them using lrelease, and then include them in your application by installing a QTranslator object in your application's main function and by loading the translation table generated by lrelease.

In the next chapter, we will take a look at another important aspect of software development that Qt Creator supports: ...

Get Application Development with Qt Creator - Second Edition 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.