17 Jun
2011
17 Jun
'11
1:15 p.m.
Hello Patrick. 2011/6/13 patrick sanchez <pack.sanchez@gmail.com>:
The template inclusion is done via a: [%- PROCESS "locale/${user.lang}/lang.tt"; %]
The language files look like: [% lang.label.status = "Status"; .... lang.phrase.sure = "Are you sure"; %]
and a tag is simply called using: [% lang.label.status %]
I tried to test similar template using Dancer::Template::TemplateToolkit. It's works fine. to pass user.lang variable, I used template 'index', { user => { lang => 'en' }}; . What template engine do you use ? Dancer's default template engine Simple does not support [%- PROCESS "locale/${user.lang}/lang.tt"; %]. Regards. -- Takeshi OKURA