projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make invoice text mouse-accessible through watermark box, #24665
[freeside.git]
/
FS
/
FS
/
Locales.pm
diff --git
a/FS/FS/Locales.pm
b/FS/FS/Locales.pm
index
bf10990
..
849929c
100644
(file)
--- a/
FS/FS/Locales.pm
+++ b/
FS/FS/Locales.pm
@@
-29,7
+29,12
@@
Returns a list of the available locales.
tie our %locales, 'Tie::IxHash',
'en_US', { name => 'English', country => 'United States', },
tie our %locales, 'Tie::IxHash',
'en_US', { name => 'English', country => 'United States', },
+ 'en_AU', { name => 'English', country => 'Australia', },
'en_CA', { name => 'English', country => 'Canada', },
'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_US', { name => 'Spanish', country => 'United States', },
'fr_CA', { name => 'French', country => 'Canada', },
'fr_FR', { name => 'French', country => 'France', },
'fr_HT', { name => 'French', country => 'Haiti', },
'fr_CA', { name => 'French', country => 'Canada', },
'fr_FR', { name => 'French', country => 'France', },
'fr_HT', { name => 'French', country => 'Haiti', },
@@
-52,7
+57,13
@@
Returns a hash of information about a locale.
sub locale_info {
my($class, $locale) = @_;
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
}
=item description LOCALE