tie our %locales, 'Tie::IxHash',
'en_US', { name => 'English', country => 'United States', },
+ 'en_AU', { name => 'English', country => 'Australia', },
'en_CA', { name => 'English', country => 'Canada', },
+ 'es_ES', { name => 'Spanish', country => 'Spain', },
+ 'es_CU', { name => 'Spanish', country => 'Cuba', },
+ 'es_MX', { name => 'Spanish', country => 'Mexico', },
+ 'es_PA', { name => 'Spanish', country => 'Panama', },
+ 'es_US', { name => 'Spanish', country => 'United States', },
'fr_CA', { name => 'French', country => 'Canada', },
'fr_FR', { name => 'French', country => 'France', },
'fr_HT', { name => 'French', country => 'Haiti', },
sub locale_info {
my($class, $locale) = @_;
- %{ $locales{$locale} };
+ if (!$locale) {
+ return ();
+ } elsif (exists $locales{$locale}) {
+ return %{ $locales{$locale} };
+ } else {
+ die "unsupported locale '$locale'\n";
+ }
}
=item description LOCALE