OSDN Git Service

62634d41600b65a26ff3b54910de80f76e87fe27
[linuxjm/LDP_man-pages.git] / draft / man3 / nl_langinfo.3
1 .\" Copyright (c) 2001 Markus Kuhn <mkuhn@acm.org>
2 .\"
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
7 .\"
8 .\" References consulted:
9 .\"   GNU glibc-2 manual
10 .\"   OpenGroup's Single Unix specification http://www.UNIX-systems.org/online.html
11 .\"
12 .\" Corrected prototype, 2002-10-18, aeb
13 .\"
14 .\" Japanese Version Copyright (c) 2001
15 .\"          UCHIDA Norihiro all rights reserved.
16 .\" Translated Sun Jul 15 2001
17 .\"          by UCHIDA Norihiro <KY4N-UCD@asahi-net.or.jp>
18 .\"
19 .TH NL_LANGINFO 3 2001-05-11 "GNU" "Linux Programmer's Manual"
20 .\"O .SH NAME
21 .\"O nl_langinfo \- query language and locale information
22 .SH Ì¾Á°
23 nl_langinfo \- ¸À¸ì¤È¥í¥±¡¼¥ë¤Î¾ðÊó¤òÌ䤤¹ç¤ï¤»¤ë
24 .\"O .SH SYNOPSIS
25 .SH ½ñ¼°
26 .nf
27 .B #include <langinfo.h>
28 .sp
29 .BI "char *nl_langinfo(nl_item " item );
30 .fi
31 .\"O .SH DESCRIPTION
32 .SH ÀâÌÀ
33 .\"O The
34 .\"O .BR nl_langinfo ()
35 .\"O function provides access to locale information
36 .\"O in a more flexible way than
37 .\"O .BR localeconv (3)
38 .\"O does.
39 .\"O Individual and additional elements of the locale categories can
40 .\"O be queried.
41 .BR nl_langinfo ()
42 ´Ø¿ô¤Ï¡¢
43 .BR localeconv (3)
44 ¤è¤ê½ÀÆð¤Ê¥í¥±¡¼¥ë¾ðÊó¤Ø¤Î¥¢¥¯¥»¥¹ÊýË¡¤òÄ󶡤¹¤ë¡£
45 ¥í¥±¡¼¥ë¥«¥Æ¥´¥ê¤Î¸Ä¡¹¤ÎÍ×ÁǤäÄɲäÎÍ×ÁǤòÌ䤤¹ç¤ï¤»¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
46 .PP
47 .\"O Examples for the locale elements that can be specified in \fIitem\fP
48 .\"O using the constants defined in \fI<langinfo.h>\fP are:
49 \fI<langinfo.h>\fP ¤ËÄê¿ô¤È¤·¤ÆÄêµÁ¤µ¤ì¤Æ¤¤¤Æ¡¢
50 \fIitem\fP ¤Ë»ØÄê¤Ç¤­¤ë¥í¥±¡¼¥ëÍ×ÁǤÎÎã¤ò°Ê²¼¤Ë¼¨¤¹:
51 .TP
52 .BR CODESET \ (LC_CTYPE)
53 .\"O Return a string with the name of the character encoding used in the
54 .\"O selected locale, such as "UTF-8", "ISO-8859-1", or "ANSI_X3.4-1968"
55 .\"O (better known as US-ASCII).
56 .\"O This is the same string that you get with
57 .\"O "locale charmap".
58 .\"O For a list of character encoding names,
59 .\"O try "locale \-m", cf.\&
60 .\"O .BR locale (1).
61 ÁªÂò¤µ¤ì¤¿¥í¥±¡¼¥ë¤ÇÍѤ¤¤é¤ì¤ëʸ»ú¥¨¥ó¥³¡¼¥É̾¤ò¼¨¤¹Ê¸»úÎó¤òÊÖ¤¹¡£
62 ʸ»ú¥¨¥ó¥³¡¼¥É̾¤È¤·¤Æ¤Ï¡¢"UTF-8" ¤ä "ISO-8859-1"¡¢"ANSI_X3.4-1968"
63 (¤³¤ì¤Ï US-ASCII ¤È¤¤¤¦Ì¾Á°¤ÎÊý¤¬¤è¤¯ÃΤé¤ì¤Æ¤¤¤ë) ¤Ê¤É¤¬¤¢¤ë¡£
64 ¤³¤Îʸ»úÎó¤Ï¡¢"locale charmap" ¤ò¼Â¹Ô¤·¤ÆÆÀ¤é¤ì¤ë¤â¤Î¤ÈƱ¤¸¤Ç¤¢¤ë¡£
65 ʸ»ú¥¨¥ó¥³¡¼¥É̾¤Î¥ê¥¹¥È¤òÆÀ¤ë¤Ë¤Ï¡¢"locale \-m" ¤ò¼Â¹Ô¤¹¤ë¤È¤è¤¤¡£
66 »²¹Í:
67 .BR locale (1)
68 .TP
69 .BR D_T_FMT \ (LC_TIME)
70 .\"O Return a string that can be used as a format string for
71 .\"O .BR strftime (3)
72 .\"O to represent time and date in a locale-specific way.
73 ¥í¥±¡¼¥ë¸ÇÍ­¤Î»þ´Ö¤ÈÆüÉÕ¤òɽ¸½¤¹¤ë¤È¤­¤Ë¡¢
74 .BR strftime (3)
75 ¤Ç»ÈÍѤǤ­¤ë½ñ¼°ÉÕ¤­Ê¸»úÎó¤òÊÖ¤¹¡£
76 .TP
77 .BR D_FMT \ (LC_TIME)
78 .\"O Return a string that can be used as a format string for
79 .\"O .BR strftime (3)
80 .\"O to represent a date in a locale-specific way.
81 ¥í¥±¡¼¥ë¸ÇÍ­¤ÎÆüÉÕ¤òɽ¸½¤¹¤ë¤È¤­¤Ë¡¢
82 .BR strftime (3)
83 ¤Ç»ÈÍѤǤ­¤ë½ñ¼°ÉÕ¤­Ê¸»úÎó¤òÊÖ¤¹¡£
84 .TP
85 .BR T_FMT \ (LC_TIME)
86 .\"O Return a string that can be used as a format string for
87 .\"O .BR strftime (3)
88 .\"O to represent a time in a locale-specific way.
89 ¥í¥±¡¼¥ë¸ÇÍ­¤Î»þ´Ö¤òɽ¸½¤¹¤ë¤È¤­¤Ë¡¢
90 .BR strftime (3)
91 ¤Ç»ÈÍѤǤ­¤ë½ñ¼°ÉÕ¤­Ê¸»úÎó¤òÊÖ¤¹¡£
92 .TP
93 .BR DAY_ "{1\(en7} (LC_TIME)"
94 .\"O Return name of the \fIn\fP-th day of the week. [Warning: this follows
95 .\"O the US convention DAY_1 = Sunday, not the international convention
96 .\"O (ISO 8601) that Monday is the first day of the week.]
97 ÍËÆü̾ (½µ¤Î \fIn\fP ÈÖÌܤÎÆü¤Î̾Á°) ¤òÊÖ¤¹¡£[·Ù¹ð: ¤³¤ÎÍ×ÁǤϥ¢¥á¥ê¥«¤Î
98 ´·½¬¤Ë½¾¤Ã¤Æ DAY_1 ¤¬ ÆüÍËÆü¤È¤Ê¤ë¡£¹ñºÝŪ¤Ê´·½¬ (ISO 8601) ¤Ç¤Ï·îÍËÆü¤¬
99 ½µ¤ÎºÇ½é¤ÎÆü¤Ç¤¢¤ë¡£]
100 .TP
101 .BR ABDAY_ "{1\(en7} (LC_TIME)"
102 .\"O Return abbreviated name of the \fIn\fP-th day of the week.
103 ÍËÆü (½µ¤Î \fIn\fP ÈÖÌܤÎÆü) ¤Î¾Êά̾¤òÊÖ¤¹¡£
104 .TP
105 .BR MON_ "{1\(en12} (LC_TIME)"
106 .\"O Return name of the \fIn\fP-th month.
107 \fIn\fP ÈÖÌܤηî¤Î̾Á°¤òÊÖ¤¹¡£
108 .TP
109 .BR ABMON_ "{1\(en12} (LC_TIME)"
110 .\"O Return abbreviated name of the \fIn\fP-th month.
111 \fIn\fP ÈÖÌܤηî¤Î¾Êά̾¤òÊÖ¤¹¡£
112 .TP
113 .BR RADIXCHAR \ (LC_NUMERIC)
114 .\"O Return radix character (decimal dot, decimal comma, etc.).
115 ´ð¿ôµ­¹æ (¾®¿ôÅÀ¤ä¥³¥ó¥Þ¤Ê¤É) ¤òÊÖ¤¹¡£
116 .TP
117 .BR THOUSEP \ (LC_NUMERIC)
118 .\"O Return separator character for thousands (groups of three digits).
119 Àé¤Î°Ì (3 ·å¤Î¿ôÃÍ) ¤Î¶èÀÚ¤êʸ»ú¤òÊÖ¤¹¡£
120 .TP
121 .BR YESEXPR \ (LC_MESSAGES)
122 .\"O Return a regular expression that can be used with the
123 .\"O .BR regex (3)
124 .\"O function to recognize a positive response to a yes/no question.
125 yes/no ¤Î¼ÁÌä¤ËÂФ¹¤ë¹ÎÄê¤Î±þÅú¤òǧ¼±¤¹¤ë¤¿¤á¤Ë¡¢
126 .BR regex (3)
127 ´Ø¿ô¤Ç»ÈÍѤǤ­¤ëÀµµ¬É½¸½¤òÊÖ¤¹¡£
128 .TP
129 .BR NOEXPR \ (LC_MESSAGES)
130 .\"O Return a regular expression that can be used with the
131 .\"O .BR regex (3)
132 .\"O function to recognize a negative response to a yes/no question.
133 yes/no ¤Î¼ÁÌä¤ËÂФ¹¤ëÈÝÄê¤Î±þÅú¤òǧ¼±¤¹¤ë¤¿¤á¤Ë
134 .BR regex (3)
135 ´Ø¿ô¤Ç»ÈÍѤǤ­¤ëÀµµ¬É½¸½¤òÊÖ¤¹¡£
136 .TP
137 .BR CRNCYSTR \ (LC_MONETARY)
138 .\"O Return the currency symbol, preceded by "\-" if the symbol should
139 .\"O appear before the value, "+" if the symbol should appear after the
140 .\"O value, or "." if the symbol should replace the radix character.
141 Ä̲ߵ­¹æ¤òÊÖ¤¹¡£
142 µ­¹æ¤¬¿ôÃͤÎÁ°¤ËÇÛÃÖ¤µ¤ì¤ë¾ì¹ç¤Ï¡¢"\-" ¤¬Ä̲ߵ­¹æ¤ËÁ°ÃÖ¤µ¤ì¤ë¡£
143 ¿ôÃͤθå¤Ëµ­¹æ¤¬ÇÛÃÖ¤µ¤ì¤ë¾ì¹ç¤Ï "+" ¤¬¡¢
144 µ­¹æ¤¬´ð¿ôʸ»ú¤ÈÃÖ¤­´¹¤ï¤ë¾ì¹ç¤Ï "." ¤¬Á°ÃÖ¤µ¤ì¤ë¡£
145 .PP
146 .\"O The above list covers just some examples of items that can be requested.
147 .\"O For a more detailed list, consult
148 .\"O .IR "The GNU C Library Reference Manual" .
149 ¾åµ­¤Î¥ê¥¹¥È¤Ï¡¢Í×µá¤Ç¤­¤ëÄêµÁ¤Î¤´¤¯°ìÉô¤Ç¤¢¤ë¡£
150 ¾ÜºÙ¤Ê¥ê¥¹¥È¤Ï¡¢
151 .I "GNU C ¥é¥¤¥Ö¥é¥ê¡¦¥ê¥Õ¥¡¥ì¥ó¥¹¥Þ¥Ë¥å¥¢¥ë"
152 ¤ò»²¾È¤·¤Æ¤Û¤·¤¤¡£
153 .\"O .SH "RETURN VALUE"
154 .SH ÊÖ¤êÃÍ
155 .\"O If no locale has been selected for the appropriate category,
156 .\"O .BR nl_langinfo ()
157 .\"O returns a pointer to the corresponding string in the
158 .\"O "C" locale.
159 ŬÀڤʥ«¥Æ¥´¥ê¤Î¥í¥±¡¼¥ë¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¡¢
160 .BR nl_langinfo ()
161 ¤Ï "C" ¥í¥±¡¼¥ë¤Î¤È¤­¤ËÁêÅö¤¹¤ëʸ»úÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£
162 .PP
163 .\"O If \fIitem\fP is not valid, a pointer to an empty string is returned.
164 ̵¸ú¤Ê \fIitem\fP ¤Î¾ì¹ç¤Ï¡¢¶õʸ»úÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¤¬ÊÖ¤µ¤ì¤ë¡£
165 .PP
166 .\"O This pointer may point to static data that may be overwritten on the
167 .\"O next call to \fBnl_langinfo\fP() or
168 .\"O .BR setlocale (3).
169 ¤³¤Î¥Ý¥¤¥ó¥¿¤ÏÀÅŪ¤Ê¥Ç¡¼¥¿Îΰè¤ò»Ø¤·¡¢¤½¤ÎÆâÍƤϼ¡²ó¤Î
170 .BR nl_langinfo ()
171 ¤ä
172 .BR setlocale (3)
173 ¤Î¸Æ¤Ó½Ð¤·¤Ë¤è¤Ã¤Æ½ñ¤­Âؤï¤ë¤³¤È¤¬¤¢¤ë¡£
174 .\"O .SH "CONFORMING TO"
175 .SH ½àµò
176 SUSv2, POSIX.1-2001.
177 .\"O .SH "SEE ALSO"
178 .SH ´ØÏ¢¹àÌÜ
179 .BR locale (1),
180 .BR localeconv (3),
181 .BR setlocale (3),
182 .BR charsets (7),
183 .BR locale (7)
184 .br
185 .\"O The GNU C Library Reference Manual
186 GNU C ¥é¥¤¥Ö¥é¥ê¡¦¥ê¥Õ¥¡¥ì¥ó¥¹¥Þ¥Ë¥å¥¢¥ë