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. Translator: Can I switch to input language as a translation?
QtWS25 Last Chance

Translator: Can I switch to input language as a translation?

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

    Hello to all,

    is there a way to load the original input language with the translator?

    Meaning, I have defined translatable texts for labels in QtDesigner and directly in the code in English. I've created a .ts file for German and from that, using QtLinguist, a .qm file. Now I can install German translations using the .qm file and switch to English by unloading it, again. But, of course, English is not being translated. Thus, texts like

    tr("%n measurement(s) saved", 0, n)

    are not translated, so the singular/plural forms are not automatically changed. Is there a way to load the input language ("English" in my case) with the translator without having to create a dedicated .qm file using lupdate, QtLinguist and lrelease?

    Kind regards,

    Markus

    1 Reply Last reply
    0
    • JohanSoloJ Offline
      JohanSoloJ Offline
      JohanSolo
      wrote on last edited by
      #2

      IIRC the strings in tr( ) are meant to be IDs, and therefore they are not meant to be printed at all in a released product. Therefore I don't think you can skip the creation of a qm file for English, even if you've written nice English sentences in the tr() statements.

      `They did not know it was impossible, so they did it.'
      -- Mark Twain

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

        Thanks for your answer, JohanSolo!
        Greetings,
        Markus

        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