%doc>
Allows the user to select the language of his choice
Usage: <& /lib/language.html &>
%doc>
<%method links>
Please make my language preference
English
|
Prefiero
Español
por mi idioma, gracias
|
<%args>
$path
%args>
%method>
<%init>
# dv({where => '/lib/language.html-1', args => \%ARGS});
if ($language) {
$m->session->{language} = $language;
# dv({where => '/lib/language.html-2', session => $m->session});
my $handle = Maz::reset_language_handle();
# dv({where => '/lib/language.html-3', handle => $handle});
$m->comp('/lib/url:redirect' , path => $return_to);
}
$caller = $return_to || $m->callers(1)->path;
$m->comp('SELF:links' , path => '/lib/language.html');
%init>
<%shared>
my $caller;
%shared>
<%args>
$language => undef
$return_to => undef
%args>