Apache-Language
view release on metacpan or search on metacpan
Language.pod view on Meta::CPAN
like your module to be nice to them and print the messages in their native language.
For this approach to work, a few things are needed. First, the client software (Netscape/IE/lynx, etc.) should
send an Accept-Language: header telling the webserver what languages it's user understands. This might sound simple, but
as a web-surfer, did you set that language setting in your browser? Most likely, you didn't. So the first step is to
correctly configure your browser and try to make sure your users/visitors will have done the same, or they might not
get what you want them to read.
Secondly, you must store the messages you want to display in each avaliable languages. For this example, we will use the
default LanguageHandler Apache::Language::PlainFile that ships with this distribution. To do that, suppose your module
is named Apache::MyModule and it's stored in a file named MyModule.pm. You will only need to edit a file named MyModule.dic
in the same place your module is stored. The format of that file is : (for more information see
L<Apache::Language::PlainFile>(3)).
error01:en
Error Message 01
error01:fr
Message d'erreur 01
Language/Constants.pm view on Meta::CPAN
$r ? $r->warn($err_msg) : warn($err_msg);
}
return;
}
# Preloaded methods go here.
# Autoload methods go after =cut, and are processed by the autosplit program.
1;
__END__
# Below is the stub of documentation for your module. You better edit it!
=head1 NAME
Apache::Language::Constants - Apache::Language constants for use by LanguageHandlers
=head1 SYNOPSIS
use Apache::Language::Constants;
=head1 DESCRIPTION
( run in 0.404 second using v1.01-cache-2.11-cpan-de7293f3b23 )