Qt World Summit: Submit your Presentation

Translate part of application is it possible ?

  • Hey!
    I would like to translate a part of my application before create class is it possible ?

    Currently it's work fine for complete application, but I need to translate an print preview in other language with this way :

    - Load translator with language .qm 
    - create class
    - display only this widget and base class with this new language


  • Moderators

    should be possible:

    1. create QTranslator object
    2. use it's load() method to load the .qm file (don't use QCoreApplication::installTranslator())
    3. use it's translate() method directly to get the translated strings - instead of tr()

  • Thanks @raven-worx but I see a problem:
    How to reference this string to translate if I don't put the tr("")... ?

    ---- EDIT
    Arf sorry lupate take the const string too!
    Solved Thx ;)

Log in to reply