This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
2e7910e518e3910219f7d250ee26214cc726eabd
[perl5.git] / cpan / Locale-Codes / lib / Locale / Script.pod
1 =pod
2
3 =head1 NAME
4
5 Locale::Script - standard codes for script identification
6
7 =head1 SYNOPSIS
8
9    use Locale::Script;
10
11    $script  = code2script('phnx');                     # 'Phoenician'
12    $code    = script2code('Phoenician');               # 'Phnx'
13    $code    = script2code('Phoenician',
14                           LOCALE_CODE_NUMERIC);        # 115
15
16    @codes   = all_script_codes();
17    @scripts = all_script_names();
18
19 =head1 DESCRIPTION
20
21 This module exists as both Locale::Codes::Script and Locale::Script (for
22 historical reasons).  The Locale::Script module will continue to work.
23
24 The C<Locale::Script> module provides access to standards codes used
25 for identifying scripts, such as those defined in ISO 15924.
26
27 Most of the routines take an optional additional argument which
28 specifies the code set to use. If not specified, the default ISO
29 15924 four-letter codes will be used.
30
31 =head1 SUPPORTED CODE SETS
32
33 There are several different code sets you can use for identifying
34 scripts. The ones currently supported are:
35
36 =over 4
37
38 =item B<alpha>
39
40 This is a set of four-letter (capitalized) codes from ISO 15924
41 such as 'Phnx' for Phoenician.  It also includes additions to this
42 set included in the IANA language registry.
43
44 This code set is identified with the symbol C<LOCALE_SCRIPT_ALPHA>.
45
46 The Zxxx, Zyyy, and Zzzz codes are not used.
47
48 This is the default code set.
49
50 =item B<numeric>
51
52 This is a set of three-digit numeric codes from ISO 15924 such as 115
53 for Phoenician.
54
55 This code set is identified with the symbol C<LOCALE_SCRIPT_NUMERIC>.
56
57 =back
58
59 =head1 ROUTINES
60
61 =over 4
62
63 =item B<code2script ( CODE [,CODESET] )>
64
65 =item B<script2code ( NAME [,CODESET] )>
66
67 =item B<script_code2code ( CODE ,CODESET ,CODESET2 )>
68
69 =item B<all_script_codes ( [CODESET] )>
70
71 =item B<all_script_names ( [CODESET] )>
72
73 =item B<Locale::Script::rename_script  ( CODE ,NEW_NAME [,CODESET] )>
74
75 =item B<Locale::Script::add_script  ( CODE ,NAME [,CODESET] )>
76
77 =item B<Locale::Script::delete_script  ( CODE [,CODESET] )>
78
79 =item B<Locale::Script::add_script_alias  ( NAME ,NEW_NAME )>
80
81 =item B<Locale::Script::delete_script_alias  ( NAME )>
82
83 =item B<Locale::Script::rename_script_code  ( CODE ,NEW_CODE [,CODESET] )>
84
85 =item B<Locale::Script::add_script_code_alias  ( CODE ,NEW_CODE [,CODESET] )>
86
87 =item B<Locale::Script::delete_script_code_alias  ( CODE [,CODESET] )>
88
89 These routines are all documented in the Locale::Codes::API man page.
90
91 =back
92
93 =head1 SEE ALSO
94
95 =over 4
96
97 =item B<Locale::Codes>
98
99 The Locale-Codes distribution.
100
101 =item B<Locale::Codes::API>
102
103 The list of functions supported by this module.
104
105 =item B<http://www.unicode.org/iso15924/>
106
107 Home page for ISO 15924.
108
109 =item B<http://www.iana.org/assignments/language-subtag-registry>
110
111 The IANA language subtag registry.
112
113 =back
114
115 =head1 AUTHOR
116
117 See Locale::Codes for full author history.
118
119 Currently maintained by Sullivan Beck (sbeck@cpan.org).
120
121 =head1 COPYRIGHT
122
123    Copyright (c) 1997-2001 Canon Research Centre Europe (CRE).
124    Copyright (c) 2001-2010 Neil Bowers
125    Copyright (c) 2010-2011 Sullivan Beck
126
127 This module is free software; you can redistribute it and/or
128 modify it under the same terms as Perl itself.
129
130 =cut