Dynamic Translation



  • 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



  • 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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.