[Product-Developers] Re: Question about i18n message in python files

Jean-Pascal Houde jphoude at gmail.com
Sat Apr 26 14:42:54 UTC 2008


Thanks, that's what I was suspecting.
Is there a way to do the translation in python? (I guess there must be
a way since the template engine does it, but I didn't find anything by
looking at the class or the attributes of the message)

On Apr 25, 6:17 pm, "Steve McMahon" <st... at dcn.org> wrote:
> I'm pretty sure that _(u'N/A') is creating a MessageFactory message
> object. No translation is done at that point, as the target language
> isn't known 'til page rendering.
>
> These message objects are polymorphous, and if you concatenate one to a string:
>
> _(u'N/A') + 'oops'
>
> or even to another message, the result is a string -- not a message.
>
> You need to do the concatenation in the page template.
>




More information about the Product-Developers mailing list