[PyQt] multiple languages within the same application
david at boddie.org.uk
Mon Mar 14 20:15:17 GMT 2011
On Mon Mar 14 17:34:19 GMT 2011, Samuele Carcagno wrote:
> is it possible to have different parts of an application translated into
> different languages? For example say that an application has two buttons,
> would it be possible to have the label of button1 translated in Italian and
> the label of button2 translated in French?
Yes, it's possible.
> If it is possible, how would I go about it? The
> QApplication.installTranslator() function seems to affect the application
> globally, and I don't see an easy way to select a particular translator for
> a specific widget or group of widgets.
You might find it interesting to look at the i18n example supplied with PyQt.
It is located in the examples/tools/i18n directory.
More information about the PyQt