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. Sub projects translation
Forum Updated to NodeBB v4.3 + New Features

Sub projects translation

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.2k 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.
  • I Offline
    I Offline
    idertator
    wrote on last edited by
    #1

    I have a project structure that consists in several libraries and plugins used by a Qt desktop application. Some of these plugins launch certain dialogs that i need to internationalize and not only de main app. I used an approach of generate a translation file for each plugin, but when i load it from the main app doesn't translate anything. What is going wrong? anybody have a solution?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      It should work this way. Just create a "QTranslator":http://doc.qt.nokia.com/4.7/qtranslator.html for each file and make it visible to the app with "QCoreApplication::installTranslator() ":http://doc.qt.nokia.com/4.7/qcoreapplication.html#installTranslator

      The translator objects must remain valid for the lifetime of the QApplication object.

      http://www.catb.org/~esr/faqs/smart-questions.html

      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