[PyKDE] i18n of QFileDialog
Phil Thompson
phil at river-bank.demon.co.uk
Sat May 5 12:49:44 BST 2001
Thomas Gfüllner wrote:
>
> Hi all,
>
> I'm not able to nationalize my QFileDialog
>
> I tried:
>
> from qt import *
> import sys
>
> app = QApplication(sys.argv)
>
> t = QTranslator(None)
>
> t.insert('QFileDialog', 'Look &in', 'Zeige in')
> t.insert('QFileDialog', 'Look in', 'Zeige in')
>
> t.insert('QFileDialog', 'Cancel', 'Abbr&echen')
>
> t.insert('QFileDialog', 'File name', 'Datei Name')
> t.insert('QFileDialog', 'File type', 'Dateityp')
>
> app.installTranslator(t)
>
> dirName = QFileDialog.getExistingDirectory('/',None, 'P', 'Ordner', 1)
>
> The script only works for the "Cancel" button?
>
> Any ideas?
The equivalent C++ version behaves in the same way, so either there is a
bug in your code, or a bug in Qt.
Phil
More information about the PyQt
mailing list