<div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>Just from the plugin documentation you wont get any web "user" translations. Just for the system wide language.<br><br></div>it would be fine if the example of "Sending messages to the user" had something like this:<br><br><% FOR message IN messages %><br>    <div class="alert alert-<% message.bootstrap_color %>"><br>        <% message.toString(session.user_lang) | html_entity %>                                       <br>    </div><br><% END %><br><br></div>This works really fine for end user localization.<br></div>A awesome plugin evolution would be not to check de "locale" but a session lang or from "accept-language" header :-)<br><br></div>Paulo<br><div><div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-03-03 9:25 GMT+00:00 Andrew Beverley <span dir="ltr"><<a href="mailto:andy@andybev.com" target="_blank">andy@andybev.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, 2016-03-03 at 08:58 +0000, Zahir Lalani wrote:<br>
> Can i get some ideas of how people are handling internationalisation<br>
> within a dancer framework?<br>
<br>
</span>With Dancer2::Plugin::LogReport<br>
<br>
It will integrate all your logging, user messages, exceptions and<br>
translations. It is very flexible and powerful.<br>
<br>
I did a talk about it at the Dancer conference. The talk isn't great (I<br>
repeated it at LPW, but simplified and without the translations), but<br>
the slides are here. Have a look at slide 15 onwards:<br>
<br>
<a href="http://files.andybev.com/log-report-dancerconf.odp" rel="noreferrer" target="_blank">http://files.andybev.com/log-report-dancerconf.odp</a><br>
<br>
It's a steep learning curve, but that's because it's so powerful. Stick<br>
it out, and you will be rewarded. You may get up and running quicker<br>
with other approaches, but you will likely have headaches and/or<br>
limitations later on.<br>
<br>
I did an introduction to the module, but without the translations. I'll<br>
write up translations later:<br>
<br>
<a href="https://github.com/abeverley/advent-calendar/blob/master/2015/9-easy-exceptions-and-logging.pod" rel="noreferrer" target="_blank">https://github.com/abeverley/advent-calendar/blob/master/2015/9-easy-exceptions-and-logging.pod</a><br>
<br>
I'm the author of the module, and very happy to answer questions and<br>
help out.<br>
<br>
Andy<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
</div></div></blockquote></div><br></div>