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. How translate widgets from external library with own Qt application
Forum Updated to NodeBB v4.3 + New Features

How translate widgets from external library with own Qt application

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 385 Views
  • 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.
  • D Offline
    D Offline
    dporobic
    wrote on 6 Apr 2020, 05:41 last edited by
    #1

    I have an Application that uses an external widget, written by me though, but its a standalone project and is used as library by my application. My Application is translated using qt5_create_translation and qt5_add_translation which creates translation files that I load via
    QTranslator::load. This external widget has some UI Strings that I would like to translate, ideally together with the rest of my application. Is there any solution to achieve this or do I need to manage two translation files for every language, one for my application and one for the external widget?

    https://github.com/ksnip/ksnip

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on 6 Apr 2020, 06:41 last edited by
      #2

      When you've the sources of the external lib it is possible to create a ts file for them, otherwise it's not possible.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dporobic
        wrote on 6 Apr 2020, 07:21 last edited by
        #3

        @Christian-Ehrlicher I do have the source but the lib is a dependency which is built and installed already when my application is being compiled. So that basically means I need two sets of ts files, no way in managing it in a single ts file per language?

        https://github.com/ksnip/ksnip

        1 Reply Last reply
        0
        • C Offline
          C Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on 6 Apr 2020, 08:45 last edited by
          #4

          At least it's much easier to have two.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0

          1/4

          6 Apr 2020, 05:41

          • Login

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