Thank you Mike. That is what I suspected. If there is way to get operational the i18n stuff from within routing.py, independntely from the request, I would be happy. Actually I don't need anything related to the still absent request, just having the _ function active there
daniel On Jun 9, 7:35 pm, Mike Orr <[email protected]> wrote: > 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.
