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. [Solved] Dynamic Translation Application
Forum Updated to NodeBB v4.3 + New Features

[Solved] Dynamic Translation Application

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.7k 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.
  • E Offline
    E Offline
    Endless
    wrote on last edited by
    #1

    I have an application that I'm in the process of translating into several other languages. One of the languages is French, and I've been able to create the .ts file and used Qt Linguist to translate all the entries. I've also created the .qm file using lrelease. I've gotten everything to switch over to French.

    The application was written in English, so my question is how do I make it go back to English? Do I delete the QTranslator variable in my code? Do I need a .qm file for English as well?

    1 Reply Last reply
    0
    • T Offline
      T Offline
      twsimpson
      wrote on last edited by
      #2

      You don't need an English translation as long as you wrote the strings in English. The translation system will just use the original strings when it doesn't have a translation for it.
      As for getting back to the default strings, you can just not install the translator into the application, and it will revert to the strings you wrote in code.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mlong
        wrote on last edited by
        #3

        See QCoreApplication::removeTranslator()

        Software Engineer
        My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

        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