[PyQt] i18n
Kovid Goyal
kovid at kovidgoyal.net
Wed Feb 11 19:14:40 GMT 2009
Ditch the whole Qt translation infrastructure. Simply postprocess the output
of pyuic4 to replace the calls to QtCore.QCoreApplication.translate() with _()
Then you can use gettext and the nice translation infrastructure in launchpad.
This has the additional advantage of not tying in your translation
infrastructure to a graphical toolkit.
Kovid.
On Wednesday 11 February 2009 06:57:59 Frédéric wrote:
> Does anybody could point me on example how to use i18n in PyQt?
>
> Riverbank documentation says that one should not use tr() method, but
> insteead QtCore.QCoreApplication.translate(). As the object must be
> passed to this method, this not improves the readability :o/
>
> Are there some tips, for example, to bind the _() method I use with
> gettext and PyGTK? Something to help me migrate my code without having
> to modify it everywhere...
>
> Are there also some tools to migrate a .po file to a Qt i18n stuff?
>
> Thanks,
>
> --
> Frédéric
>
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
> !DSPAM:3,4992e80175721139086412!
--
_____________________________________
Kovid Goyal MC 452-48
California Institute of Technology
1200 E California Blvd
Pasadena, CA 91125
cell : +01 626 390 8699
office: +01 626 395 6595 (449 Lauritsen)
email : kovid at theory.caltech.edu
web : http://www.kovidgoyal.net
_____________________________________
More information about the PyQt
mailing list