CGI::Application::Plugin::I18N is a Perl module that acts as a wrapper around Locale::Maketext::Simple by Audrey Tang. It extends the CGI::Application object with variour methods to control the localization of text. A "FAQ" is provided with the aim to fill in the gaps.
SYNOPSIS
Nothing is exported by default. You can specify a list of individual methods or use one of the groups :std, :max or :min.
use CGI::Application::Plugin::I18N qw( :std );
Within your setup, cgiapp_init, cgiapp_prerun or specific runmode routine add the line
$self->i18n_config();
Or
$self->i18n_config( %options );
%options are the same as for Locale::Maketext::Simple. If none are passed the following default are used:-
ÞFAULT_OPTIONS = (
Path => "$RealBin/I18N",
Style => 'gettext',
Export => '_maketext',
Decode => 1,
Encoding => '',
);
$RealBin being the folder from which the executed cgi script is running. Note that Export must remain as _maketext for this module to function properly!
For instance if you wanted to use maketext style markup in your lexicons you would use the line:-
$self->i18n_config( Style => 'maketext' );
Then use the localtext method to localize text:-
print $self->localtext( 'Hello World!' );
Product's homepage
Requirements:
· Perl