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

Martijn Pieters mj at zopatista.com
Sat Apr 26 20:26:44 UTC 2008


On Sat, Apr 26, 2008 at 5:59 PM, Radim Novotny <novotny.radim at gmail.com> wrote:
> from zope.i18n import translate
>  translated_string = translate(_(u"N/A"), context=self.context)

No, use the request for the context; in a view that'd be self.request:

  translate(_(u'N/A'), context=self.request)

-- 
Martijn Pieters




More information about the Product-Developers mailing list