Hi All Can i get some ideas of how people are handling internationalisation within a dancer framework? Z Sent from my iPhone
Hello for our Dancer app and web site, we use Dancer::Plugin::Locale::Wolowitz module if your translations are in database you need to create json file to export. bye Hugues Le 03/03/2016 09:58, Zahir Lalani a écrit :
Hi All
Can i get some ideas of how people are handling internationalisation within a dancer framework?
Z
Sent from my iPhone _______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
Great Will look at that today Z Sent from my iPhone
On 3 Mar 2016, at 09:03, Hugues <hugues@max4mail.com> wrote:
Hello for our Dancer app and web site, we use Dancer::Plugin::Locale::Wolowitz module if your translations are in database you need to create json file to export. bye Hugues
Le 03/03/2016 09:58, Zahir Lalani a écrit :
Hi All
Can i get some ideas of how people are handling internationalisation within a dancer framework?
Z
Sent from my iPhone _______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
On Thu, 2016-03-03 at 08:58 +0000, Zahir Lalani wrote:
Can i get some ideas of how people are handling internationalisation within a dancer framework?
With Dancer2::Plugin::LogReport It will integrate all your logging, user messages, exceptions and translations. It is very flexible and powerful. I did a talk about it at the Dancer conference. The talk isn't great (I repeated it at LPW, but simplified and without the translations), but the slides are here. Have a look at slide 15 onwards: http://files.andybev.com/log-report-dancerconf.odp It's a steep learning curve, but that's because it's so powerful. Stick it out, and you will be rewarded. You may get up and running quicker with other approaches, but you will likely have headaches and/or limitations later on. I did an introduction to the module, but without the translations. I'll write up translations later: https://github.com/abeverley/advent-calendar/blob/master/2015/9-easy-excepti... I'm the author of the module, and very happy to answer questions and help out. Andy
Thx Andy Another one to the review list.... Z
-----Original Message----- From: dancer-users [mailto:dancer-users-bounces@dancer.pm] On Behalf Of Andrew Beverley Sent: 03 March 2016 09:25 To: Perl Dancer users mailing list <dancer-users@dancer.pm> Subject: Re: [dancer-users] Internationalisation
On Thu, 2016-03-03 at 08:58 +0000, Zahir Lalani wrote:
Can i get some ideas of how people are handling internationalisation within a dancer framework?
With Dancer2::Plugin::LogReport
It will integrate all your logging, user messages, exceptions and translations. It is very flexible and powerful.
I did a talk about it at the Dancer conference. The talk isn't great (I repeated it at LPW, but simplified and without the translations), but the slides are here. Have a look at slide 15 onwards:
http://files.andybev.com/log-report-dancerconf.odp
It's a steep learning curve, but that's because it's so powerful. Stick it out, and you will be rewarded. You may get up and running quicker with other approaches, but you will likely have headaches and/or limitations later on.
I did an introduction to the module, but without the translations. I'll write up translations later:
https://github.com/abeverley/advent-calendar/blob/master/2015/9-easy- exceptions-and-logging.pod
I'm the author of the module, and very happy to answer questions and help out.
Andy
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
Hi, Just from the plugin documentation you wont get any web "user" translations. Just for the system wide language. it would be fine if the example of "Sending messages to the user" had something like this: <% FOR message IN messages %> <div class="alert alert-<% message.bootstrap_color %>"> <% message.toString(session.user_lang) | html_entity %> </div> <% END %> This works really fine for end user localization. A awesome plugin evolution would be not to check de "locale" but a session lang or from "accept-language" header :-) Paulo 2016-03-03 9:25 GMT+00:00 Andrew Beverley <andy@andybev.com>:
On Thu, 2016-03-03 at 08:58 +0000, Zahir Lalani wrote:
Can i get some ideas of how people are handling internationalisation within a dancer framework?
With Dancer2::Plugin::LogReport
It will integrate all your logging, user messages, exceptions and translations. It is very flexible and powerful.
I did a talk about it at the Dancer conference. The talk isn't great (I repeated it at LPW, but simplified and without the translations), but the slides are here. Have a look at slide 15 onwards:
http://files.andybev.com/log-report-dancerconf.odp
It's a steep learning curve, but that's because it's so powerful. Stick it out, and you will be rewarded. You may get up and running quicker with other approaches, but you will likely have headaches and/or limitations later on.
I did an introduction to the module, but without the translations. I'll write up translations later:
https://github.com/abeverley/advent-calendar/blob/master/2015/9-easy-excepti...
I'm the author of the module, and very happy to answer questions and help out.
Andy
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
On Thu, 31 Mar 2016 16:06:02 +0100 Paulo A Ferreira <paulo.a.ferreira@gmail.com> wrote:
Just from the plugin documentation you wont get any web "user" translations. Just for the system wide language.
Yes, good point, it hadn't even occurred to me that you might want to do this per-user.
it would be fine if the example of "Sending messages to the user" had something like this:
<% FOR message IN messages %> <div class="alert alert-<% message.bootstrap_color %>"> <% message.toString(session.user_lang) | html_entity %> </div> <% END %>
Thanks, something like that will make a good addition. If I'm honest, I've barely touched the internationalisation aspects of this module, so any feedback is welcome. What I am fairly confident about, however, is that using the module and then adding internationalisation later will be the least painful of any option.
This works really fine for end user localization. A awesome plugin evolution would be not to check de "locale" but a session lang or from "accept-language" header :-)
Theo has done a really good module to use the various client headers. When I saw his talk at LPW it did occur to me that some easy way of combining the 2 modules would be awesome. Something I'd like to work on if/when I have time. Andy
participants (4)
-
Andrew Beverley -
Hugues -
Paulo A Ferreira -
Zahir Lalani