[PyQt] Re: Internationalization problem
Thorsten Kampe
thorsten at thorstenkampe.de
Sat Oct 20 03:13:08 BST 2007
* Andreas Pakulat (Sat, 20 Oct 2007 00:40:04 +0200)
> On 19.10.07 21:47:58, Thorsten Kampe wrote:
> > reading through Mark Summerfield's book I've tried to localise my
> > appliation. This works fine for my own translation but not for the one
> > >from Trolltech (qt_de.qm). This means that for instance all my menus
> > are in German but the close, maximize, minimize and restore buttons in
> > the upper right edge are still in English.
>
> The window-buttons are usually provided by the windowing system and thus
> are not translated by the application itself.
I know but I thought if a translation exists then this should take
priority.
> So check that your desktop environment runs in a german locale.
No, it's not. I simply set an environment variable (LANG) to de_DE and
this works (except for the controls).
> Also this should be the same then for any other apps that run on
> your machine.
Yes.
> Have you checked wether a QFileDialog provides proper translated text?
It's actually Q3TitleBar (the context as seen in Qt Linguist)
> (All files should be translated for example). Also check that the
> translation files are actually installed under
> <qt-install-dir>/translations
It is there. I copied it to the application's translation directory
and load it from there (in the resource file). When I change
qtTranslator.load(':/qt.qm')
to
if qtTranslator.load(':/qt.qm'):
print "loaded"
...it prints loaded...
Thorsten
More information about the PyQt
mailing list