View Full Version : Translation of app and Qt Dialogs
honza
10th May 2009, 20:44
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
talk2amulya
10th May 2009, 22:32
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).
honza
11th May 2009, 07:06
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
talk2amulya
11th May 2009, 09:39
why arent you loading both translators? load both one after another and install both of them..and it will all work
honza
11th May 2009, 17:53
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
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.