Dancer::Plugin::Locale::Wolowitz - Internationalization for Dancer
version 0.160190
use Dancer ':syntax'; use Dancer::Plugin::Locale::Wolowitz; get '/' => sub { template index; }
Provides an easy way to translate your application. This module relies on Locale::Wolowitz, please consult the documentation of Locale::Wolowitz.
loc('Welcome'); loc('View %1', ['Country']) loc('View %1', ['Country'], $language) or in templates <% l('Welcome') %> <% l('View %1', ['Country']) %> <% l('View %1', ['Country'], 'fr') %>
Translated to the requested language, if such a translation exists, otherwise no translation occurs. Just like in Locale::Wolowitz, with the difference that auto-detection is the default, hence an optional passed language is the third, instead of the the second argument.
input: (Str): Key translate (Arrayref): Arguments are injected to the placeholders in the string (Str): Language code, to circumvent auto-detection from browser header output: (Str): Translated to the requested language
plugins: Locale::Wolowitz: lang_session: "lang" locale_path_directory: "i18n"
This module is developed on Github at:
http://github.com/hobbestigrou/Dancer-Plugin-Locale-Wolowitz
Thanks to Ido Perlmuter for Locale::Wolowitz
Please report any bugs or feature requests via github issue tracker.
You can find documentation for this module with the perldoc command.
perldoc Dancer::Plugin::Locale::Wolowitz
Dancer Locale::Wolowitz
Natal Ngétal
This software is copyright (c) 2016 by Natal Ngétal.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Dancer::Plugin::Locale::Wolowitz, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dancer::Plugin::Locale::Wolowitz
CPAN shell
perl -MCPAN -e shell install Dancer::Plugin::Locale::Wolowitz
For more information on module installation, please visit the detailed CPAN module installation guide.