This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regen uconfig.h
[perl5.git] / cpan / Locale-Codes / lib / Locale / Language.pod
CommitLineData
f768f60b 1=pod
6b14ceb7
JH
2
3=head1 NAME
4
f768f60b 5Locale::Language - standard codes for language identification
6b14ceb7
JH
6
7=head1 SYNOPSIS
8
f768f60b 9 use Locale::Language;
6b14ceb7 10
f768f60b
S
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
JH
16
17=head1 DESCRIPTION
18
f768f60b
S
19The C<Locale::Language> module provides access to standard codes used
20for identifying languages, such as those as defined in ISO 639.
6b14ceb7 21
f768f60b
S
22Most of the routines take an optional additional argument which
23specifies the code set to use. If not specified, the default ISO
24639 two-letter codes will be used.
6b14ceb7 25
f768f60b 26=head1 SUPPORTED CODE SETS
6b14ceb7 27
f768f60b 28There are several different code sets you can use for identifying
4345d05b
CBW
29languages. A code set may be specified using either a name, or a
30constant that is automatically exported by this module.
31
32For example, the two are equivalent:
33
34 $lang = code2language('en','alpha-2');
e64a1908 35 $lang = code2language('en',LOCALE_LANG_ALPHA_2);
4345d05b
CBW
36
37The codesets currently supported are:
6b14ceb7
JH
38
39=over 4
40
4345d05b 41=item B<alpha-2, LOCALE_LANG_ALPHA_2>
6b14ceb7 42
c69a30ec
CBW
43This is the set of two-letter (lowercase) codes from ISO 639-1, such
44as 'he' for Hebrew. It also includes additions to this set included
45in the IANA language registry.
6b14ceb7 46
f768f60b 47This is the default code set.
6b14ceb7 48
4345d05b 49=item B<alpha-3, LOCALE_LANG_ALPHA_3>
6b14ceb7 50
f768f60b 51This is the set of three-letter (lowercase) bibliographic codes from
c69a30ec
CBW
52ISO 639-2 and 639-5, such as 'heb' for Hebrew. It also includes
53additions to this set included in the IANA language registry.
6b14ceb7 54
4345d05b 55=item B<term, LOCALE_LANG_TERM>
6b14ceb7 56
f768f60b
S
57This is the set of three-letter (lowercase) terminologic codes from
58ISO 639.
6b14ceb7 59
f768f60b
S
60=back
61
62=head1 ROUTINES
6b14ceb7
JH
63
64=over 4
65
5e369738 66=item B<code2language ( CODE [,CODESET] [,'retired'])>
6b14ceb7 67
5e369738 68=item B<language2code ( NAME [,CODESET] [,'retired'])>
6b14ceb7 69
f768f60b 70=item B<language_code2code ( CODE ,CODESET ,CODESET2 )>
6b14ceb7 71
5e369738 72=item B<all_language_codes ( [CODESET] [,'retired'])>
6b14ceb7 73
5e369738 74=item B<all_language_names ( [CODESET] [,'retired'])>
6b14ceb7 75
f768f60b 76=item B<Locale::Language::rename_language ( CODE ,NEW_NAME [,CODESET] )>
6b14ceb7 77
f768f60b 78=item B<Locale::Language::add_language ( CODE ,NAME [,CODESET] )>
6b14ceb7 79
f768f60b 80=item B<Locale::Language::delete_language ( CODE [,CODESET] )>
6b14ceb7 81
f768f60b 82=item B<Locale::Language::add_language_alias ( NAME ,NEW_NAME )>
6b14ceb7 83
f768f60b 84=item B<Locale::Language::delete_language_alias ( NAME )>
6b14ceb7 85
f768f60b 86=item B<Locale::Language::rename_language_code ( CODE ,NEW_CODE [,CODESET] )>
6b14ceb7 87
f768f60b 88=item B<Locale::Language::add_language_code_alias ( CODE ,NEW_CODE [,CODESET] )>
6b14ceb7 89
f768f60b 90=item B<Locale::Language::delete_language_code_alias ( CODE [,CODESET] )>
6b14ceb7 91
c69a30ec 92These routines are all documented in the Locale::Codes::API man page.
6b14ceb7
JH
93
94=back
95
96=head1 SEE ALSO
97
98=over 4
99
f768f60b 100=item B<Locale::Codes>
6b14ceb7 101
c69a30ec
CBW
102The Locale-Codes distribution.
103
104=item B<Locale::Codes::API>
105
106The list of functions supported by this module.
6b14ceb7 107
f768f60b 108=item B<http://www.loc.gov/standards/iso639-2/>
6b14ceb7 109
c69a30ec
CBW
110Source of the ISO 639-2 codes.
111
112=item B<http://www.loc.gov/standards/iso639-5/>
113
114Source of the ISO 639-5 codes.
115
116=item B<http://www.iana.org/assignments/language-subtag-registry>
117
118The IANA language subtag registry.
6b14ceb7
JH
119
120=back
121
6b14ceb7
JH
122=head1 AUTHOR
123
f768f60b 124See Locale::Codes for full author history.
6b14ceb7 125
f768f60b 126Currently maintained by Sullivan Beck (sbeck@cpan.org).
6b14ceb7 127
f768f60b 128=head1 COPYRIGHT
6b14ceb7 129
f768f60b
S
130 Copyright (c) 1997-2001 Canon Research Centre Europe (CRE).
131 Copyright (c) 2001-2010 Neil Bowers
e744ae18 132 Copyright (c) 2010-2014 Sullivan Beck
6b14ceb7
JH
133
134This module is free software; you can redistribute it and/or
135modify it under the same terms as Perl itself.
136
137=cut