Captive::Portal::Role::I18N - utils for internationalization
Parses the HTTP header 'Accept-Language' and returns an appropriate language from the configured languages or the fallback language in config file.
I18N_LANGUAGES => [ 'en', 'de', ], I18N_FALLBACK_LANG => 'en',
Poor mans gettext. Retrieve i18n system message from message catalog in config file. The default mesage catalog looks like:
I18N_MSG_CATALOG => { msg_001 => { en => 'last session state was:', de => 'Status der letzten Sitzung war:', }, msg_002 => { en => 'username or password is missing', de => 'Username oder Passwort fehlt', }, msg_003 => { en => 'username or password is wrong', de => 'Username oder Passwort ist falsch', }, msg_004 => { en => 'successfull logout', de => 'erfolgreich abgemeldet', }, msg_005 => { en => 'admin_secret is wrong', de => 'Admin-Passwort ist falsch', }, msg_006 => { en => 'Idle-session reestablished due to valid cookie.', de => 'Abgelaufene Sitzung durch gueltiges Cookie erneuert.', }, },
Add your own translation to the conig hash.
Karl Gaissmaier, <gaissmai at cpan.org>
<gaissmai at cpan.org>
Copyright 2010-2013 Karl Gaissmaier, all rights reserved.
This distribution is free software; you can redistribute it and/or modify it under the terms of either:
a) the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version, or
b) the Artistic License version 2.0.
To install Captive::Portal, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Captive::Portal
CPAN shell
perl -MCPAN -e shell install Captive::Portal
For more information on module installation, please visit the detailed CPAN module installation guide.