Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Translation using QCoreApplication::translate
Forum Updated to NodeBB v4.3 + New Features

Translation using QCoreApplication::translate

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mahima
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Mahima
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved