1Locale::Language(3)   User Contributed Perl Documentation  Locale::Language(3)
2
3
4

NAME

6       Locale::Language - standard codes for language identification
7

SYNOPSIS

9          use Locale::Language;
10
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();
16

DESCRIPTION

18       The "Locale::Language" module provides access to standard codes used
19       for identifying languages, such as those as defined in ISO 639.
20
21       Most of the routines take an optional additional argument which
22       specifies the code set to use. If not specified, the default ISO 639
23       two-letter codes will be used.
24

SUPPORTED CODE SETS

26       There are several different code sets you can use for identifying
27       languages. A code set may be specified using either a name, or a
28       constant that is automatically exported by this module.
29
30       For example, the two are equivalent:
31
32          $lang = code2language('en','alpha-2');
33          $lang = code2language('en',LOCALE_LANG_ALPHA_2);
34
35       The codesets currently supported are:
36
37       alpha-2, LOCALE_LANG_ALPHA_2
38           This is the set of two-letter (lowercase) codes from ISO 639-1,
39           such as 'he' for Hebrew.  It also includes additions to this set
40           included in the IANA language registry.
41
42           This is the default code set.
43
44       alpha-3, LOCALE_LANG_ALPHA_3
45           This is the set of three-letter (lowercase) bibliographic codes
46           from ISO 639-2 and 639-5, such as 'heb' for Hebrew.  It also
47           includes additions to this set included in the IANA language
48           registry.
49
50       term, LOCALE_LANG_TERM
51           This is the set of three-letter (lowercase) terminologic codes from
52           ISO 639.
53

ROUTINES

55       code2language ( CODE [,CODESET] )
56       language2code ( NAME [,CODESET] )
57       language_code2code ( CODE ,CODESET ,CODESET2 )
58       all_language_codes ( [CODESET] )
59       all_language_names ( [CODESET] )
60       Locale::Language::rename_language  ( CODE ,NEW_NAME [,CODESET] )
61       Locale::Language::add_language  ( CODE ,NAME [,CODESET] )
62       Locale::Language::delete_language  ( CODE [,CODESET] )
63       Locale::Language::add_language_alias  ( NAME ,NEW_NAME )
64       Locale::Language::delete_language_alias  ( NAME )
65       Locale::Language::rename_language_code  ( CODE ,NEW_CODE [,CODESET] )
66       Locale::Language::add_language_code_alias  ( CODE ,NEW_CODE [,CODESET]
67       )
68       Locale::Language::delete_language_code_alias  ( CODE [,CODESET] )
69           These routines are all documented in the Locale::Codes::API man
70           page.
71

SEE ALSO

73       Locale::Codes
74           The Locale-Codes distribution.
75
76       Locale::Codes::API
77           The list of functions supported by this module.
78
79       http://www.loc.gov/standards/iso639-2/
80           Source of the ISO 639-2 codes.
81
82       http://www.loc.gov/standards/iso639-5/
83           Source of the ISO 639-5 codes.
84
85       http://www.iana.org/assignments/language-subtag-registry
86           The IANA language subtag registry.
87

AUTHOR

89       See Locale::Codes for full author history.
90
91       Currently maintained by Sullivan Beck (sbeck@cpan.org).
92
94          Copyright (c) 1997-2001 Canon Research Centre Europe (CRE).
95          Copyright (c) 2001-2010 Neil Bowers
96          Copyright (c) 2010-2013 Sullivan Beck
97
98       This module is free software; you can redistribute it and/or modify it
99       under the same terms as Perl itself.
100
101
102
103perl v5.16.3                      2013-06-03               Locale::Language(3)
Impressum