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. [Translations] documentation on embedding translations in the executable.

[Translations] documentation on embedding translations in the executable.

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 580 Views 2 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Good morning

    Years ago I have looked up the procedure for embedding translations into the executable file. It worked for me, but I remember to have had severe problems to understand the diverse texts that I had found.

    Is there something more recent or a documentation which is considered up-to-date with the current Qt releases? Ad hoc, I see links that mention Qt 4.4.3 but chances are, not much has changed anyway since that version.

    Otherwise ... I have once written my own howto and just stumbled on it again. Updates might be necessary, but my language was intended to be human understandable. Depending on your reactions, I could publish that once again.

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

      Simply add the generated QM files to your qrc resource file should work.

      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
      4
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Embedding
        Into
        The
        Executable.

        Pl45m4P 1 Reply Last reply
        0
        • ? A Former User

          Embedding
          Into
          The
          Executable.

          Pl45m4P Offline
          Pl45m4P Offline
          Pl45m4
          wrote on last edited by Pl45m4
          #4

          @Simplicius-Simplicissimus said in [Translations] documentation on embedding translations in the executable.:

          Embedding
          Into
          The
          Executable.

          ???

          That's what @Christian-Ehrlicher wrote above.
          No need to mock him...
          We all can read what you posted

          Read about the Qt Resource System, if you don't understand.

          @Simplicius-Simplicissimus said in [Translations] documentation on embedding translations in the executable.:

          Is there something more recent or a documentation which is considered up-to-date with the current Qt releases?

          So hard to find the current/latest Qt 6.9 documentation?!


          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          1 Reply Last reply
          1
          • ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            The QTLinguist Documentation included in https://doc.qt.io/qt-6/reference-overview.html does not explain how to embed translations in the executable file.
            I talk about what you do in the project-file with

            CONFIG += lrelease embed_translations
            

            I do not need to ship the translation files with the program.

            But never mind. Ignore this thread. Ω

            Pl45m4P 1 Reply Last reply
            0
            • ? A Former User

              The QTLinguist Documentation included in https://doc.qt.io/qt-6/reference-overview.html does not explain how to embed translations in the executable file.
              I talk about what you do in the project-file with

              CONFIG += lrelease embed_translations
              

              I do not need to ship the translation files with the program.

              But never mind. Ignore this thread. Ω

              Pl45m4P Offline
              Pl45m4P Offline
              Pl45m4
              wrote on last edited by Pl45m4
              #6

              @Simplicius-Simplicissimus said in [Translations] documentation on embedding translations in the executable.:

              The QTLinguist Documentation included in https://doc.qt.io/qt-6/reference-overview.html does not explain how to embed translations in the executable file.

              But the other source I linked does...

              Literally the first section there:

              The Qt Resource System

              The Qt resource system is a platform-independent mechanism for shipping resource files in an application. Use it if your application always needs a certain set of files (like icons, translation files, images), and you don't want to use system-specific means to package and locate these resources.

              Most commonly, the resource files are embedded into your application executable, or in libraries and plugins that are loaded by the application executable. Alternatively, the resource files can also be stored in an external resource file.
              The resource system is based on tight cooperation between Qt's rcc resource compiler, the build system, and the Qt runtime API.

              This is what @Christian-Ehrlicher told you... and what I was referring to here:

              @Pl45m4 said in [Translations] documentation on embedding translations in the executable.:

              Read about the Qt Resource System, if you don't understand.

              @Simplicius-Simplicissimus said in [Translations] documentation on embedding translations in the executable.:

              I do not need to ship the translation files with the program.

              Using the resource system you "ship" them as bytecode embedded in your binary.
              You don't want to provide 17 files for 17 different languages, right?
              What else do you need?!


              If debugging is the process of removing software bugs, then programming must be the process of putting them in.

              ~E. W. Dijkstra

              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