Qt World Summit: Submit your Presentation

How translate widgets from external library with own Qt application

  • I have an Application that uses an external widget, written by me though, but its a standalone project and is used as library by my application. My Application is translated using qt5_create_translation and qt5_add_translation which creates translation files that I load via
    QTranslator::load. This external widget has some UI Strings that I would like to translate, ideally together with the rest of my application. Is there any solution to achieve this or do I need to manage two translation files for every language, one for my application and one for the external widget?

  • Lifetime Qt Champion

    When you've the sources of the external lib it is possible to create a ts file for them, otherwise it's not possible.

  • @Christian-Ehrlicher I do have the source but the lib is a dependency which is built and installed already when my application is being compiled. So that basically means I need two sets of ts files, no way in managing it in a single ts file per language?

  • Lifetime Qt Champion

    At least it's much easier to have two.

Log in to reply