i18n, RT#12515
[freeside.git] / FS / FS / Locales.pm
1 package FS::Locales;
2
3 use strict;
4 use Tie::IxHash;
5
6 =head1 NAME
7
8 FS::Locales - Supported locales
9
10 =head1 SYNOPSIS
11
12   use FS::Locales;
13
14   my @locales = FS::Locales->locales;
15
16 =head1 DESCRIPTION
17
18 FS::Locales provides a list of supported locales.
19
20 =head1 CLASS METHODS
21
22 =over 4
23
24 =item locales
25
26 Returns a list of the available locales.
27
28 =cut
29
30 tie our %locales, 'Tie::IxHash',
31   'en_US', { name => 'English', country => 'United States', },
32   'iw_IL', { name => 'Hebrew',  country => 'Israel', rtl=>1, },
33 ;
34
35 sub locales {
36   keys %locales;
37 }
38
39 =item locale_info LOCALE
40
41 Returns a hash of information about a locale.
42
43 =cut
44
45 sub locale_info {
46   my($class, $locale) = @_;
47   %{ $locales{$locale} };
48 }
49
50 =back
51
52 =head1 BUGS
53
54 =head1 SEE ALSO
55
56 L<FS::Msgcat>
57
58 =cut
59
60 1;
61