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. Linguist in a Shared Library
Forum Updated to NodeBB v4.3 + New Features

Linguist in a Shared Library

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 453 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.
  • F Offline
    F Offline
    fem_dev
    wrote on last edited by
    #1

    I'm developing a main Qt C++ application and a set of C++ plugins (shared libraries) for this same application.

    The main application have a Linguist feature using QTranslator to enable the final user changes the UI language.

    First question:
    Is there a way to, when the user change the Main App language, all plugins receive a signal and change his own internal languages too simultaneously?

    Second question:
    If this is possible, how can I check if the user selected language in the Main App exists inside each plugin?
    I said it because, if the main app language doesn't exist inside some plugin, this plugin should be load a "default" language.

    My system:

    • Qt Creator 4.12.4
    • Qt 5.15
    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @fem_dev said in Linguist in a Shared Library:

      change his own internal languages too simultaneously?

      See documentation of QTranslator / QCoreApplication::installTranslator()

      inside each plugin?

      No, but you can write a plugin function where you can ask every plugin about this.

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

      F 1 Reply Last reply
      3
      • Christian EhrlicherC Christian Ehrlicher

        @fem_dev said in Linguist in a Shared Library:

        change his own internal languages too simultaneously?

        See documentation of QTranslator / QCoreApplication::installTranslator()

        inside each plugin?

        No, but you can write a plugin function where you can ask every plugin about this.

        F Offline
        F Offline
        fem_dev
        wrote on last edited by
        #3

        @Christian-Ehrlicher perfect! Thank you!

        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