[PyQt] pylupdate4 vs QButtonBox

Juergen Urner jUrner at arcor.de
Mon Aug 20 10:57:28 BST 2007


David wrote:
> Create a translator, load the translation, then "install" it so that the
> application can use it:
>
>   translator = QTranslator()
>   translator.load(translations_path + "qt_"+QLocale.system().name())
>   app.installTranslator(translator)
>
> You can locate the translations that were installed alongside Qt by querying
> the QLibraryInfo class:
>
>   translations_path = QLibraryInfo.location(QLibraryInfo.TranslationsPath)
>
> That way, you don't have to hard code the path.
>
> David

Thanks David. I completely missed QLibraryInfo(...) and already wondered
if I had to find out where Qt stores its translation files on my disk by 
hand.


Jürgen





More information about the PyQt mailing list