8 FS::Locales - Supported locales
14 my @locales = FS::Locales->locales;
18 FS::Locales provides a list of supported locales.
26 Returns a list of the available locales.
30 tie our %locales, 'Tie::IxHash',
31 'en_US', { name => 'English', country => 'United States', },
32 'en_CA', { name => 'English', country => 'Canada', },
33 'fr_CA', { name => 'French', country => 'Canada', },
34 'fr_FR', { name => 'French', country => 'France', },
35 'fr_HT', { name => 'French', country => 'Haiti', },
36 'ht_HT', { name => 'Haitian Creole', country => 'Haiti', },
37 'iw_IL', { name => 'Hebrew', country => 'Israel', rtl=>1, },
40 $_->{label} = $_->{name} . ' (' . $_->{country} . ')'
41 foreach values %locales;
47 =item locale_info LOCALE
49 Returns a hash of information about a locale.
54 my($class, $locale) = @_;
55 %{ $locales{$locale} };
58 =item description LOCALE
60 Returns "Language (Country)" for a locale.
65 my($class, $locale) = @_;
66 $locales{$locale}->{'name'} . ' (' . $locales{$locale}->{'country'} . ')';