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