[PyKDE] Re: Translating UI files

Jorge Godoy godoy at ieee.org
Fri May 20 22:38:17 BST 2005


"Hihn, Jason" <Jason.Hihn at verint.com> writes:

> How does one go about translating UI files when apps are completely
> written in python with PyQt?

Run something like 

        pyuic -p 4 -o file.py file.ui

This will create 'modules'.  Run something like 

        pyuic -x -p 4 -o main.py main.ui

to create the main executable.

You'll have to subclass the modules to make changes since the files get
overwritten everytime they are regenerated.

> In my app I use QWidgetFactory to create a dialog from a ui file. I need
> to translate that, preferably without making a ui file for each
> language.


There's a method for handling and dealing with I18N and L10N.  Here on my box
the docs are at /usr/share/doc/packages/qt3/html/i18n.html and you should be
able to find them online at http://doc.trolltech.com/3.3/i18n.html


Be seeing you,
-- 
Jorge Godoy      <godoy at ieee.org>




More information about the PyQt mailing list