# Here is the list of ISO-639:1988 language codes. Obtained from
# http://www.uk.adlibsoft.com/iso/iso639.html on 1999-12-26.
return if $locale_loaded;
eval "require Psh::Locale::Default";
# Now try to use a locale module depending on LANG
if( $lang and $lang ne "C" and $lang ne "POSIX") {
"português" => "Portuguese",
"portugues" => "Portuguese",
$lang=$alias_table{$lang} if( exists $alias_table{$lang});
eval "use Psh::Locale::$lang";
# We are reading the locale data simply as perl modules
# A better way would be to maybe use Locale::PGetText
# but that would again increase the requirements for
# You can call the following a hack - we call
# strftime to calculate dates to get the locale dependent
# names - if anybody knows a better method to access
# the locales installed on the system, feel free to change it
for( my $i=0; $i<12; $i++) {
push( @mon, POSIX
::strftime
("%b",0,0,0,1,$i,99));
@mon= qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
for( my $i=0; $i<7; $i++) {
push( @wday, POSIX
::strftime
("%a",0,0,0,19+$i,11,99,$i));
@wday=qw(Sun Mon Tue Wed Thu Fri Sat);
Psh::Locale - containing base code for I18N
Initializes locale support
@tmp= Psh::Locale::months();
Returns an array of locale-dependant month names
@tmp= Psh::Locale::weekdays();
Returns an array of locale-dependant weekday names
Psh::Locale::months(qw(Jan Feb ...));
Psh::Locale::weekdays(qw(Jan Feb ...));
Psh::Locale::get_text($name)
Returns the named text from the current locale
Psh::Locale::set_text($name,$value)
Markus Peter, warp@spin.de