Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / man / man3 / I18N::Langinfo.3
CommitLineData
86530b38
AT
1.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13
2.\"
3.\" Standard preamble:
4.\" ========================================================================
5.de Sh \" Subsection heading
6.br
7.if t .Sp
8.ne 5
9.PP
10\fB\\$1\fR
11.PP
12..
13.de Sp \" Vertical space (when we can't use .PP)
14.if t .sp .5v
15.if n .sp
16..
17.de Vb \" Begin verbatim text
18.ft CW
19.nf
20.ne \\$1
21..
22.de Ve \" End verbatim text
23.ft R
24.fi
25..
26.\" Set up some character translations and predefined strings. \*(-- will
27.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28.\" double quote, and \*(R" will give a right double quote. | will give a
29.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
30.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
31.\" expand to `' in nroff, nothing in troff, for use with C<>.
32.tr \(*W-|\(bv\*(Tr
33.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34.ie n \{\
35. ds -- \(*W-
36. ds PI pi
37. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
39. ds L" ""
40. ds R" ""
41. ds C` ""
42. ds C' ""
43'br\}
44.el\{\
45. ds -- \|\(em\|
46. ds PI \(*p
47. ds L" ``
48. ds R" ''
49'br\}
50.\"
51.\" If the F register is turned on, we'll generate index entries on stderr for
52.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53.\" entries marked with X<> in POD. Of course, you'll have to process the
54.\" output yourself in some meaningful fashion.
55.if \nF \{\
56. de IX
57. tm Index:\\$1\t\\n%\t"\\$2"
58..
59. nr % 0
60. rr F
61.\}
62.\"
63.\" For nroff, turn off justification. Always turn off hyphenation; it makes
64.\" way too many mistakes in technical documents.
65.hy 0
66.if n .na
67.\"
68.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69.\" Fear. Run. Save yourself. No user-serviceable parts.
70. \" fudge factors for nroff and troff
71.if n \{\
72. ds #H 0
73. ds #V .8m
74. ds #F .3m
75. ds #[ \f1
76. ds #] \fP
77.\}
78.if t \{\
79. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80. ds #V .6m
81. ds #F 0
82. ds #[ \&
83. ds #] \&
84.\}
85. \" simple accents for nroff and troff
86.if n \{\
87. ds ' \&
88. ds ` \&
89. ds ^ \&
90. ds , \&
91. ds ~ ~
92. ds /
93.\}
94.if t \{\
95. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101.\}
102. \" troff and (daisy-wheel) nroff accents
103.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110.ds ae a\h'-(\w'a'u*4/10)'e
111.ds Ae A\h'-(\w'A'u*4/10)'E
112. \" corrections for vroff
113.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115. \" for low resolution devices (crt and lpr)
116.if \n(.H>23 .if \n(.V>19 \
117\{\
118. ds : e
119. ds 8 ss
120. ds o a
121. ds d- d\h'-1'\(ga
122. ds D- D\h'-1'\(hy
123. ds th \o'bp'
124. ds Th \o'LP'
125. ds ae ae
126. ds Ae AE
127.\}
128.rm #[ #] #H #V #F C
129.\" ========================================================================
130.\"
131.IX Title "I18N::Langinfo 3"
132.TH I18N::Langinfo 3 "2002-06-01" "perl v5.8.0" "Perl Programmers Reference Guide"
133.SH "NAME"
134I18N::Langinfo \- query locale information
135.SH "SYNOPSIS"
136.IX Header "SYNOPSIS"
137.Vb 1
138\& use I18N::Langinfo;
139.Ve
140.SH "DESCRIPTION"
141.IX Header "DESCRIPTION"
142The \fIlanginfo()\fR function queries various locale information that can be
143used to localize output and user interfaces. The \fIlanginfo()\fR requires
144one numeric argument that identifies the locale constant to query:
145if no argument is supplied, \f(CW$_\fR is used. The numeric constants
146appropriate to be used as arguments are exportable from I18N::Langinfo.
147.PP
148The following example will import the \fIlanginfo()\fR function itself and
149three constants to be used as arguments to \fIlanginfo()\fR: a constant for
150the abbreviated first day of the week (the numbering starts from
151Sunday = 1) and two more constants for the affirmative and negative
152answers for a yes/no question in the current locale.
153.PP
154.Vb 1
155\& use I18N::Langinfo qw(langinfo ABDAY_1 YESSTR NOSTR);
156.Ve
157.PP
158.Vb 1
159\& my ($abday_1, $yesstr, $nostr) = map { langinfo } qw(ABDAY_1 YESSTR NOSTR);
160.Ve
161.PP
162.Vb 1
163\& print "$abday_1? [$yesstr/$nostr] ";
164.Ve
165.PP
166In other words, in the \*(L"C\*(R" (or English) locale the above will probably
167print something like:
168.PP
169.Vb 1
170\& Sun? [yes/no]
171.Ve
172.PP
173but under a French locale
174.PP
175.Vb 1
176\& dim? [oui/non]
177.Ve
178.PP
179The usually available constants are
180.PP
181.Vb 6
182\& ABDAY_1 ABDAY_2 ABDAY_3 ABDAY_4 ABDAY_5 ABDAY_6 ABDAY_7
183\& ABMON_1 ABMON_2 ABMON_3 ABMON_4 ABMON_5 ABMON_6
184\& ABMON_7 ABMON_8 ABMON_9 ABMON_10 ABMON_11 ABMON_12
185\& DAY_1 DAY_2 DAY_3 DAY_4 DAY_5 DAY_6 DAY_7
186\& MON_1 MON_2 MON_3 MON_4 MON_5 MON_6
187\& MON_7 MON_8 MON_9 MON_10 MON_11 MON_12
188.Ve
189.PP
190for abbreviated and full length days of the week and months of the year,
191.PP
192.Vb 1
193\& D_T_FMT D_FMT T_FMT
194.Ve
195.PP
196for the date\-time, date, and time formats used by the \fIstrftime()\fR function
197(see \s-1POSIX\s0)
198.PP
199.Vb 1
200\& AM_STR PM_STR T_FMT_AMPM
201.Ve
202.PP
203for the locales for which it makes sense to have ante meridiem and post
204meridiem time formats,
205.PP
206.Vb 1
207\& CODESET CRNCYSTR RADIXCHAR
208.Ve
209.PP
210for the character code set being used (such as \*(L"\s-1ISO8859\-1\s0\*(R", \*(L"cp850\*(R",
211\&\*(L"koi8\-r\*(R", \*(L"sjis\*(R", \*(L"utf8\*(R", etc.), for the currency string, for the
212radix character used between the integer and the fractional part
213of decimal numbers (yes, this is redundant with \fIPOSIX::localeconv()\fR)
214.PP
215.Vb 1
216\& YESSTR YESEXPR NOSTR NOEXPR
217.Ve
218.PP
219for the affirmative and negative responses and expressions, and
220.PP
221.Vb 1
222\& ERA ERA_D_FMT ERA_D_T_FMT ERA_T_FMT
223.Ve
224.PP
225for the Japanese Emperor eras (naturally only defined under Japanese locales).
226.PP
227See your \fIlanginfo\fR\|(3) for more information about the available
228constants. (Often this means having to look directly at the
229\&\fIlanginfo.h\fR C header file.)
230.PP
231Note that unfortunately none of the above constants are guaranteed
232to be available on a particular platform. To be on the safe side
233you can wrap the import in an eval like this:
234.PP
235.Vb 6
236\& eval {
237\& require I18N::Langinfo;
238\& I18N::Langinfo->import(qw(langinfo CODESET));
239\& $codeset = langinfo(CODESET()); # note the ()
240\& };
241\& if (!$@) { ... failed ... }
242.Ve
243.Sh "\s-1EXPORT\s0"
244.IX Subsection "EXPORT"
245Nothing is exported by default.
246.SH "SEE ALSO"
247.IX Header "SEE ALSO"
248perllocale, \*(L"localeconv\*(R" in \s-1POSIX\s0, \*(L"setlocale\*(R" in \s-1POSIX\s0, \fInl_langinfo\fR\|(3).
249.PP
250The \fIlanginfo()\fR is just a wrapper for the C \fInl_langinfo()\fR interface.
251.SH "AUTHOR"
252.IX Header "AUTHOR"
253Jarkko Hietaniemi, <jhi@hut.fi>
254.SH "COPYRIGHT AND LICENSE"
255.IX Header "COPYRIGHT AND LICENSE"
256Copyright 2001 by Jarkko Hietaniemi
257.PP
258This library is free software; you can redistribute it and/or modify
259it under the same terms as Perl itself.