On 09.12.2012 11:17, Werner F. Bruhin wrote:
>
> What is the recommended way to handle I18N?
>
> Do I import the "_" gettext/wxPython translation macro and then wrap
> things like this _(u"some text to translate"), or ....?
We here solve that by keeping different sets of template files for
different languages.
It is not difficult to support parallel sets of text files using tools
like meld, or vim -d, or kdiff3, or even DVCS (in fact, we support a
small subset unique for each customer), and it is not always possible to
just drop in translated text and still have convenient page layout.
Apart from different lengths of the same phrase in different languages,
there are business differences for different countries and cultures.
But yes, you can call ugettext/ungetttext in expressions. Though I'm
not sure if message extraction tools would process such files.
Best wishes,
alex.
|