On Wed, Jun 9, 2010 at 9:35 AM, daniel <[email protected]> wrote:
> Hello
>
> I'm working on an i18n project with pylons. I would need using _
> function from within routing.py
>
> If trying the following import into routing.py:
> from pylons.i18n.translation import _
>
> I get an error upon a browser request sending :
> TypeError: No object (name: translator) has been registered for this
> thread
>
> Apparentely there is some object missing at that stage

Whenever you see "No object ... has been registered for this thread",
it means you're using a StackedObjectProxy, such as the Pylons magic
globals. Normally these are active only during requests, although
config/app_globals/url are pushed specially as soon as they are
available so they can be used earlier. I don't know whether '_' can be
handled likewise. Ben can probably answer when he has time.

-- 
Mike Orr <[email protected]>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to