Translation using QCoreApplication::translate



  • Hi,

    I have defined a function which uses QCoreApplication::translate to translate the string. In Qt 4, this function was working but in Qt 5.3.1 this function is not working.

    Do anyone is having any idea what is going wrong?

    Maahi


  • Lifetime Qt Champion

    Hi,

    Without your code it's pretty much Crystal Ball Debugging. Please share your function code.



  • Yeah,

    The function is
    void Translate (const QString& context, const QString& str, QString& translation)
    {
    translation = QCoreApplication::translate (context.toLatin1 (), str.toLatin1 ());
    }

    Then the context and str is passed which should be translated. But when I run lupdate nothing is translated and ts file is not updated.

    Do you have any idea?

    Maahi


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.