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

Dynamic Translation

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

    Hi
    My Qt application supports dynamic translation IE the user can change languages whilst the application is running

    Now I have a need to find the English equivalent of a translated string and don't seem to be able to find a way

    For example
    Given QString s = tr("Hello");
    I need to be able to get "Hello" from s after translation has taken place.

    Has anyone done this before or have any ideas on how (if) it can be achieved

    Thanks

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

      I need to be able to get "Hello" from s after translation has taken place.

      You can't. tr() returns a translated QString. This QString contains no translation information at all.

      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