Great! I'll have a try!

Daniel

On 28 Aug., 16:18, Alberto Valverde <[EMAIL PROTECTED]> wrote:
> On Aug 27, 2007, at 10:44 PM, Daniel Haus wrote:
>
>
>
> > Now there's still this Genshi translation-filter issue. The Pylons
> > i18n tutorial does cover message extraction from Genshi, but there are
> > no hints on configuration of that filter, which i think would be
> > necessary. Is this a common problem, or am I missing something
> > obvious?
>
> Take a look athttp://genshi.edgewall.org/wiki/Documentation/
> i18n.html#translation and the  source of genshi's Buffet plugin.  
> Apparently (haven't tried, so tell us how it goes...:) you should be  
> able to do something like:
>
> from genshi.filters import Translator
> from pylons.i18n import _
>
> def template_loaded(template):
>      template.filters.insert(0, Translator(_))
>
> Then you would need to pass this callback when initializing genshi's  
> buffet plugin:
>
> inside middleware.py (or load_environment):
>
> options = {"genshi.loader_callback": template_loaded}
> # options.update(options_from_config_file)
> config.add_template_engine("genshi", "yourapp.templates", options)
>
> HTH,
> Alberto


--~--~---------~--~----~------------~-------~--~----~
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