language5.pl - Demonstration of Locales::Language setLocale Usage.
setLocale
./language5.pl
This is a simple demonstration script that shows how the top level Locales::Language module will override the environment LC_ALL setting at import time. Methods for resetting the default locale are also demonstrated. For example:
$ENV{LC_ALL} = "de"; # reset environment locale. use Locales::Language ( "am" ); # override environment locale. my $l = new Locales::Language; print $l->getLocale, " => ", $l->code2language ( "en" ), "\n"; $l->setLocale ( "fr" ); # reset default locale. print $l->getLocale, " => ", $l->code2language ( "en" ), "\n"; $l->setLocale; # no arg returns to the import setting print $l->getLocale, " => ", $l->code2language ( "en" ), "\n";
Daniel Yacob, dyacob@cpan.org
Locales::Language
To install Locales::Base, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Locales::Base
CPAN shell
perl -MCPAN -e shell install Locales::Base
For more information on module installation, please visit the detailed CPAN module installation guide.