[PyQt] Translating ui files with gettext

Albert Cervera i Areny albert at nan-tic.com
Thu Sep 18 01:41:25 BST 2008


A Dimecres 17 Setembre 2008, Albert Cervera i Areny va escriure:
> I'd like to use gettext for translating strings in .ui files, are there any
> tricks one can use to do that if they are loaded dynamically "loadUi()"?
>
> It seems that in C++ there's a the '-tr' parameter in 'uic' and I see no
> equivalent to that in pyuic. I might consider using pyuic instead of
> loadUi() if that should allow using gettext...

I answer myself in case anyone needs something like this. Though I haven't 
tested it yet I've found Translate Toolkit [1] that it can probably be used 
in a script to convert .ts files to .po and viceversa.

[1] http://www.ohloh.net/projects/translate-toolkit

-- 
Albert Cervera i Areny
http://www.NaN-tic.com


More information about the PyQt mailing list