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. Application_ru.qm is not detected automatically

Application_ru.qm is not detected automatically

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

    I try to translate an application to russian and can't figure out how to do it properly.
    I have managed to get .qm file as being told at http://qt-project.org/doc/qt-5/linguist-programmers.html.

    Now there is a phrase at http://qt-project.org/doc/qt-5/linguist-manager.html saying:

    bq. Once the QM files are available the application will detect them and use them automatically

    I rebuild an application but there is no russian translation.

    What other things should I check/do to get it working?

    I test on laptop with locale:
    @
    LANG=ru_RU.UTF-8
    LANGUAGE=ru
    @

    My .pro part of file:
    @

    Translations

    lupdate_only {
    SOURCES = *.qml
    *.js
    }
    TRANSLATIONS = tabatarium_ru.ts

    @

    All translations in .ts file are "finished".

    Thanks!

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      You need to use "QTranslator":http://qt-project.org/doc/qt-5/qtranslator.html to load the QM file.

      (Z(:^

      1 Reply Last reply
      0
      • H Offline
        H Offline
        habamax
        wrote on last edited by
        #3

        [quote author="sierdzio" date="1406011863"]You need to use "QTranslator":http://qt-project.org/doc/qt-5/qtranslator.html to load the QM file.[/quote]

        Thx!
        Should translation files be included into resource file or placed next to executable?

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          [quote author="Maxim Kim" date="1406013730"]Thx!
          Should translation files be included into resource file or placed next to executable?[/quote]

          That is entirely up to you, depends on which you like more. I would recommend placing them next to the executable (for example, in "translations" folder), because it allows you to update the translation (or even add a new one) without having to compile and distribute your application binary again.

          (Z(:^

          1 Reply Last reply
          0
          • H Offline
            H Offline
            habamax
            wrote on last edited by
            #5

            ok, thx a lot!

            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