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