ACME-Error-Translate
view release on metacpan or search on metacpan
Revision history for Perl extension ACME::Error::Translate.
0.01 Fri Sep 20 11:55:11 2002
- original version; created by h2xs 1.2 with options
-XAn ACME::Error::Translate
Makefile.PL view on Meta::CPAN
use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'ACME::Error::Translate',
'VERSION_FROM' => 'Translate.pm', # finds $VERSION
'PREREQ_PM' => { ACME::Error => 0.01, Lingua::Translate => 0.01 }, # e.g., Module::Name => 1.1
);
Translate.pm view on Meta::CPAN
use strict;
no strict 'refs';
use vars qw[$VERSION];
$VERSION = '0.01';
use Lingua::Translate;
{
my $translator = undef;
sub import {
my $class = shift;
$translator = Lingua::Translate->new( src => 'en', dest => shift );
}
*die_handler = *warn_handler = sub {
if ( $translator ) {
return map $translator->translate( $_ ), @_;
} else {
return @_;
}
};
}
1;
__END__
=head1 NAME
ACME::Error::Translate - Language Translating Backend for ACME::Error
=head1 SYNOPSIS
use ACME::Error Translate => de;
die "Stop!"; # Anschlag!
=head1 DESCRIPTION
Translates error messages from the default English to the language of your
choice using L<Lingua::Translate>. As long as the backend used by
L<Lingua::Translage> understands your two letter language code, you're ok.
By default the backend is Babelfish.
=head1 AUTHOR
( run in 0.237 second using v1.01-cache-2.11-cpan-4d50c553e7e )