[Dancer-users] Dancer and i18n

Takeshi OKURA okura3 at gmail.com
Fri Jun 17 15:15:51 CEST 2011


Hello Patrick.

2011/6/13 patrick sanchez <pack.sanchez at 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


More information about the Dancer-users mailing list