Results 1 to 2 of 2

Thread: Translation issues

  1. #1
    Join Date
    Feb 2010
    Posts
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt Jambi
    Platforms
    MacOS X Unix/X11 Windows

    Default Translation issues

    Hi everyone,

    I'm intergrating Qt internationalization features to my application and I'm experiencing some issues with the tr function.

    Here's what's going on:

    I have a class called MainController located in a dynamic library. This class is a sub-sub-sub...whatever...-sub class of QObject. This class is somehow displaying some textual information on the gui. So I'm using MainController:tr for any string I want to get translated.

    I sucessfully generated the ts, translated everything and I provided the .qm file to the main function. Made sure everything was loaded before any of the Gui component could be created.

    The problem is: I can't get my strings to be translated using this method. The only workaround I was able to find is to use QObject::tr in my code instead of MainController::tr. Making the trnaslation process pretty messy.

    Any help would be appreciated.
    Thanks in advance.

    Regards

  2. #2
    Join Date
    Feb 2010
    Posts
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt Jambi
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Translation issues

    Just to add some information. I tried creating some QObject subclass along with my main function (not in a dynamic library) and it's seems to work.
    Last edited by Auliyaa; 15th March 2010 at 15:47.

Similar Threads

  1. Translation of UI
    By elizabeth.h1 in forum Qt Programming
    Replies: 1
    Last Post: 2nd November 2009, 11:01
  2. Submitting Qt translation
    By mcosta in forum Qt Programming
    Replies: 0
    Last Post: 22nd October 2009, 10:23
  3. problem with Translation
    By #andi# in forum Newbie
    Replies: 1
    Last Post: 9th August 2009, 15:14
  4. Translation
    By merlvingian in forum Qt Programming
    Replies: 1
    Last Post: 14th August 2007, 17:45
  5. Translation without HTML
    By Marco812 in forum Qt Tools
    Replies: 4
    Last Post: 25th November 2006, 16:08

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.