Results 1 to 5 of 5

Thread: Translation of app and Qt Dialogs

  1. #1
    Join Date
    Apr 2007
    Location
    Czech republic
    Posts
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Translation of app and Qt Dialogs

    Hi all,
    i want to completely translate my application, incl. Qt Dialogs...

    i can do it separately.. just application (without QtDialogs, they remains in english), or Qt Dialogs only...

    How can i translate both in same time?? (App+QtDialogs)

    Please, help me.

    Honza

  2. #2
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Translation of app and Qt Dialogs

    Few things to check:

    1. arent dialogs a part of your application?
    2. do you have Q_OBJECT and tr in dialog classes?

    translators are installed on the whole app, so if you have dialogs in app itself, with tr and Q_OBJECT, evth would work fine. in case your dialog classes arent derived from QObject, you can use Q_DECLARE_TR_FUNCTION(YourClass).

  3. #3
    Join Date
    Apr 2007
    Location
    Czech republic
    Posts
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Translation of app and Qt Dialogs

    Hi, thanks for reply.

    dialogs... i thought for example QFileDialog, QColorDialog, QFileDialog.....

    as i wrote, i can translate those dialogs OR my application..

    in my application i use tr() and "everything" is ok, but Qt Dialogs (QFileDialog, QColorDialog, QFileDialog)

    when i load ($QTDIR)/translations/qt_cs.qm into QTranslator, then dialogs (only) are in Czech,
    when i load ":/translations/myapp_cs.qm" then my application (only) is in Czech..

    What should i do for both (Qt Dialogs and my application) were translated?

    PS: my .ui based dialogs are translated.

    Honza

  4. #4
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Translation of app and Qt Dialogs

    why arent you loading both translators? load both one after another and install both of them..and it will all work

  5. #5
    Join Date
    Apr 2007
    Location
    Czech republic
    Posts
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Translation of app and Qt Dialogs

    Quote Originally Posted by talk2amulya View Post
    why arent you loading both translators? load both one after another and install both of them..and it will all work
    Thank you!
    i allways tried to load and install the same translator...
    that was the problem.. it should be 2 different objects of QTranslator..

    now it works!

    honza

Tags for this Thread

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.