Commit | Line | Data |
f768f60b |
1 | =pod |
6b14ceb7 |
2 | |
3 | =head1 NAME |
4 | |
f768f60b |
5 | Locale::Language - standard codes for language identification |
6b14ceb7 |
6 | |
7 | =head1 SYNOPSIS |
8 | |
f768f60b |
9 | use Locale::Language; |
6b14ceb7 |
10 | |
f768f60b |
11 | $lang = code2language('en'); # $lang gets 'English' |
12 | $code = language2code('French'); # $code gets 'fr' |
13 | |
14 | @codes = all_language_codes(); |
15 | @names = all_language_names(); |
6b14ceb7 |
16 | |
17 | =head1 DESCRIPTION |
18 | |
f768f60b |
19 | The C<Locale::Language> module provides access to standard codes used |
20 | for identifying languages, such as those as defined in ISO 639. |
6b14ceb7 |
21 | |
f768f60b |
22 | Most of the routines take an optional additional argument which |
23 | specifies the code set to use. If not specified, the default ISO |
24 | 639 two-letter codes will be used. |
6b14ceb7 |
25 | |
f768f60b |
26 | =head1 SUPPORTED CODE SETS |
6b14ceb7 |
27 | |
f768f60b |
28 | There are several different code sets you can use for identifying |
29 | languages. The ones currently supported are: |
6b14ceb7 |
30 | |
31 | =over 4 |
32 | |
f768f60b |
33 | =item B<alpha-2> |
6b14ceb7 |
34 | |
f768f60b |
35 | This is the set of two-letter (lowercase) codes from ISO 639, such |
36 | as 'he' for Hebrew. |
6b14ceb7 |
37 | |
f768f60b |
38 | This code set is identified with the symbol C<LOCALE_LANG_ALPHA_2>. |
6b14ceb7 |
39 | |
f768f60b |
40 | This is the default code set. |
6b14ceb7 |
41 | |
f768f60b |
42 | =item B<alpha-3> |
6b14ceb7 |
43 | |
f768f60b |
44 | This is the set of three-letter (lowercase) bibliographic codes from |
45 | ISO 639, such as 'heb' for Hebrew. |
6b14ceb7 |
46 | |
f768f60b |
47 | This code set is identified with the symbol C<LOCALE_LANG_ALPHA_3>. |
6b14ceb7 |
48 | |
f768f60b |
49 | =item B<term> |
6b14ceb7 |
50 | |
f768f60b |
51 | This is the set of three-letter (lowercase) terminologic codes from |
52 | ISO 639. |
6b14ceb7 |
53 | |
f768f60b |
54 | This code set is identified with the symbol C<LOCALE_LANG_TERM>. |
6b14ceb7 |
55 | |
f768f60b |
56 | =back |
57 | |
58 | =head1 ROUTINES |
6b14ceb7 |
59 | |
60 | =over 4 |
61 | |
f768f60b |
62 | =item B<code2language ( CODE [,CODESET] )> |
6b14ceb7 |
63 | |
f768f60b |
64 | =item B<language2code ( NAME [,CODESET] )> |
6b14ceb7 |
65 | |
f768f60b |
66 | =item B<language_code2code ( CODE ,CODESET ,CODESET2 )> |
6b14ceb7 |
67 | |
f768f60b |
68 | =item B<all_language_codes ( [CODESET] )> |
6b14ceb7 |
69 | |
f768f60b |
70 | =item B<all_language_names ( [CODESET] )> |
6b14ceb7 |
71 | |
f768f60b |
72 | =item B<Locale::Language::rename_language ( CODE ,NEW_NAME [,CODESET] )> |
6b14ceb7 |
73 | |
f768f60b |
74 | =item B<Locale::Language::add_language ( CODE ,NAME [,CODESET] )> |
6b14ceb7 |
75 | |
f768f60b |
76 | =item B<Locale::Language::delete_language ( CODE [,CODESET] )> |
6b14ceb7 |
77 | |
f768f60b |
78 | =item B<Locale::Language::add_language_alias ( NAME ,NEW_NAME )> |
6b14ceb7 |
79 | |
f768f60b |
80 | =item B<Locale::Language::delete_language_alias ( NAME )> |
6b14ceb7 |
81 | |
f768f60b |
82 | =item B<Locale::Language::rename_language_code ( CODE ,NEW_CODE [,CODESET] )> |
6b14ceb7 |
83 | |
f768f60b |
84 | =item B<Locale::Language::add_language_code_alias ( CODE ,NEW_CODE [,CODESET] )> |
6b14ceb7 |
85 | |
f768f60b |
86 | =item B<Locale::Language::delete_language_code_alias ( CODE [,CODESET] )> |
6b14ceb7 |
87 | |
f768f60b |
88 | These routines are all documented in the Locale::Codes man page. |
6b14ceb7 |
89 | |
90 | =back |
91 | |
92 | =head1 SEE ALSO |
93 | |
94 | =over 4 |
95 | |
f768f60b |
96 | =item B<Locale::Codes> |
6b14ceb7 |
97 | |
f768f60b |
98 | =item B<Locale::Constants> |
6b14ceb7 |
99 | |
f768f60b |
100 | =item B<http://www.loc.gov/standards/iso639-2/> |
6b14ceb7 |
101 | |
f768f60b |
102 | Source of the ISO 639 codes. |
6b14ceb7 |
103 | |
104 | =back |
105 | |
6b14ceb7 |
106 | =head1 AUTHOR |
107 | |
f768f60b |
108 | See Locale::Codes for full author history. |
6b14ceb7 |
109 | |
f768f60b |
110 | Currently maintained by Sullivan Beck (sbeck@cpan.org). |
6b14ceb7 |
111 | |
f768f60b |
112 | =head1 COPYRIGHT |
6b14ceb7 |
113 | |
f768f60b |
114 | Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). |
115 | Copyright (c) 2001-2010 Neil Bowers |
116 | Copyright (c) 2010-2010 Sullivan Beck |
6b14ceb7 |
117 | |
118 | This module is free software; you can redistribute it and/or |
119 | modify it under the same terms as Perl itself. |
120 | |
121 | =cut |