1Locale::Codes::LanguageU(s3e)r Contributed Perl DocumentaLtoicoanle::Codes::Language(3)
2
3
4

NAME

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

SYNOPSIS

9          use Locale::Codes::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::Codes::Language" module provides access to standard codes
19       used 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::Codes::Language::rename_language  ( CODE ,NEW_NAME [,CODESET] )
61       Locale::Codes::Language::add_language  ( CODE ,NAME [,CODESET] )
62       Locale::Codes::Language::delete_language  ( CODE [,CODESET] )
63       Locale::Codes::Language::add_language_alias  ( NAME ,NEW_NAME )
64       Locale::Codes::Language::delete_language_alias  ( NAME )
65       Locale::Codes::Language::rename_language_code  ( CODE ,NEW_CODE
66       [,CODESET] )
67       Locale::Codes::Language::add_language_code_alias  ( CODE ,NEW_CODE
68       [,CODESET] )
69       Locale::Codes::Language::delete_language_code_alias  ( CODE [,CODESET]
70       )
71           These routines are all documented in the Locale::Codes::API man
72           page.
73

SEE ALSO

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

AUTHOR

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