Results 1 to 3 of 3

Thread: QT translate with ID

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default QT translate with ID

    Hello,

    I need to translate a program via QT translate.
    And I am looking a way to use ID instead of source message. But to keep source message as default value if ID was not find in translator.

    Something like:
    tr("ID_145587","This is default string")
    If ID_145587 is find by translator we use the translated string else we use "This is default string".

    I find a way to do this partialy
    //% "This is default string"
    QString translated = qtTrId("ID_GUI_1564");
    That allow to use "This is default string" if string as not been translate but display "ID_GUI_1564" if no qm loaded.
    And i do not find a way to work with string with param like tr("Value string is %1").arg(QString(value))

    There is any way to do that i need ?
    Last edited by nmantelier; 6th January 2017 at 13:10.

Similar Threads

  1. Need people to translate my app
    By xtal256 in forum General Discussion
    Replies: 2
    Last Post: 29th April 2013, 23:28
  2. Translate my app (dynamic)
    By liran ritkop in forum Qt Programming
    Replies: 6
    Last Post: 31st March 2011, 10:25
  3. Dynamic Translate
    By liran ritkop in forum Qt Programming
    Replies: 14
    Last Post: 30th March 2011, 12:22
  4. Translate help framework's gui
    By yagabey in forum Qt Programming
    Replies: 0
    Last Post: 14th October 2010, 07:38
  5. translate on fly
    By Noxxik in forum Qt Programming
    Replies: 5
    Last Post: 26th February 2009, 14:21

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.