Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 05cd670d8a02b2b4a0ffb1756f2e8308 > files > 8415

php-manual-zh-5.2.4-1mdv2008.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>nl_langinfo</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="PHP 手册"
HREF="index.html"><LINK
REL="UP"
TITLE="String 字符串处理函数"
HREF="ref.strings.html"><LINK
REL="PREVIOUS"
TITLE="money_format"
HREF="function.money-format.html"><LINK
REL="NEXT"
TITLE="nl2br"
HREF="function.nl2br.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=UTF-8"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP 手册</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.money-format.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.nl2br.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.nl-langinfo"
></A
>nl_langinfo</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN226089"
></A
><P
>    (PHP 4 &#62;= 4.1.0, PHP 5)</P
>nl_langinfo&nbsp;--&nbsp;
     Query language and locale information
    </DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN226092"
></A
><H2
>Description</H2
>string <B
CLASS="methodname"
>nl_langinfo</B
> ( int item )<BR
></BR
><P
>&#13;     <B
CLASS="function"
>nl_langinfo()</B
> is used to access individual elements of
     the locale categories.  Unlike <A
HREF="function.localeconv.html"
><B
CLASS="function"
>localeconv()</B
></A
>, which
     returns all of the elements, <B
CLASS="function"
>nl_langinfo()</B
> allows you
     to select any specific element.
    </P
><P
>&#13;     If <CODE
CLASS="parameter"
>item</CODE
> is not valid, <TT
CLASS="constant"
><B
>FALSE</B
></TT
> will be returned.
    </P
><P
>&#13;     <CODE
CLASS="parameter"
>item</CODE
> may be an integer value of the element or the
     constant name of the element. The following is a list of constant names
     for <CODE
CLASS="parameter"
>item</CODE
> that may be used and their description.
     Some of these constants may not be defined or hold no value for certain
     locales.
     <DIV
CLASS="table"
><A
NAME="AEN226110"
></A
><P
><B
>表 1. nl_langinfo Constants</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL
WIDTH="1*"
TITLE="c1"><COL
WIDTH="1*"
TITLE="c2"><THEAD
><TR
><TH
>Constant</TH
><TH
>Description</TH
></TR
></THEAD
><TBODY
><TR
><TD
COLSPAN="2"
ALIGN="center"
><SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>LC_TIME Category Constants</I
></SPAN
></TD
></TR
><TR
><TD
>ABDAY_(1-7)</TD
><TD
>Abbreviated name of n-th day of the week.</TD
></TR
><TR
><TD
>DAY_(1-7)</TD
><TD
>Name of the n-th day of the week (DAY_1 = Sunday).</TD
></TR
><TR
><TD
>ABMON_(1-12)</TD
><TD
>Abbreviated name of the n-th month of the year.</TD
></TR
><TR
><TD
>MON_(1-12)</TD
><TD
>Name of the n-th month of the year.</TD
></TR
><TR
><TD
>AM_STR</TD
><TD
>String for Ante meridian.</TD
></TR
><TR
><TD
>PM_STR</TD
><TD
>String for Post meridian.</TD
></TR
><TR
><TD
>D_T_FMT</TD
><TD
>String that can be used as the format string for <A
HREF="function.strftime.html"
><B
CLASS="function"
>strftime()</B
></A
> to represent time and date.</TD
></TR
><TR
><TD
>D_FMT</TD
><TD
>String that can be used as the format string for <A
HREF="function.strftime.html"
><B
CLASS="function"
>strftime()</B
></A
> to represent date.</TD
></TR
><TR
><TD
>T_FMT</TD
><TD
>String that can be used as the format string for <A
HREF="function.strftime.html"
><B
CLASS="function"
>strftime()</B
></A
> to represent time.</TD
></TR
><TR
><TD
>T_FMT_AMPM</TD
><TD
>String that can be used as the format string for <A
HREF="function.strftime.html"
><B
CLASS="function"
>strftime()</B
></A
> to represent time in 12-hour format with ante/post meridian.</TD
></TR
><TR
><TD
>ERA</TD
><TD
>Alternate era.</TD
></TR
><TR
><TD
>ERA_YEAR</TD
><TD
>Year in alternate era format.</TD
></TR
><TR
><TD
>ERA_D_T_FMT</TD
><TD
>Date and time in alternate era format (string can be used in <A
HREF="function.strftime.html"
><B
CLASS="function"
>strftime()</B
></A
>).</TD
></TR
><TR
><TD
>ERA_D_FMT</TD
><TD
>Date in alternate era format (string can be used in <A
HREF="function.strftime.html"
><B
CLASS="function"
>strftime()</B
></A
>).</TD
></TR
><TR
><TD
>ERA_T_FMT</TD
><TD
>Time in alternate era format (string can be used in <A
HREF="function.strftime.html"
><B
CLASS="function"
>strftime()</B
></A
>).</TD
></TR
><TR
><TD
COLSPAN="2"
ALIGN="center"
><SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>LC_MONETARY Category Constants</I
></SPAN
></TD
></TR
><TR
><TD
>INT_CURR_SYMBOL</TD
><TD
>International currency symbol.</TD
></TR
><TR
><TD
>CURRENCY_SYMBOL</TD
><TD
>Local currency symbol.</TD
></TR
><TR
><TD
>CRNCYSTR</TD
><TD
>Same value as CURRENCY_SYMBOL.</TD
></TR
><TR
><TD
>MON_DECIMAL_POINT</TD
><TD
>Decimal point character.</TD
></TR
><TR
><TD
>MON_THOUSANDS_SEP</TD
><TD
>Thousands separator (groups of three digits).</TD
></TR
><TR
><TD
>MON_GROUPING</TD
><TD
>Like 'grouping' element.</TD
></TR
><TR
><TD
>POSITIVE_SIGN</TD
><TD
>Sign for positive values.</TD
></TR
><TR
><TD
>NEGATIVE_SIGN</TD
><TD
>Sign for negative values.</TD
></TR
><TR
><TD
>INT_FRAC_DIGITS</TD
><TD
>International fractional digits.</TD
></TR
><TR
><TD
>FRAC_DIGITS</TD
><TD
>Local fractional digits.</TD
></TR
><TR
><TD
>P_CS_PRECEDES</TD
><TD
>Returns 1 if CURRENCY_SYMBOL precedes a positive value.</TD
></TR
><TR
><TD
>P_SEP_BY_SPACE</TD
><TD
>Returns 1 if a space separates CURRENCY_SYMBOL from a positive value.</TD
></TR
><TR
><TD
>N_CS_PRECEDES</TD
><TD
>Returns 1 if CURRENCY_SYMBOL precedes a negative value.</TD
></TR
><TR
><TD
>N_SEP_BY_SPACE</TD
><TD
>Returns 1 if a space separates CURRENCY_SYMBOL from a negative value.</TD
></TR
><TR
><TD
>P_SIGN_POSN</TD
><TD
ROWSPAN="2"
VALIGN="middle"
>&#13;          <P
></P
><UL
><LI
><P
>&#13;              Returns 0 if parentheses surround the quantity and currency_symbol.
            </P
></LI
><LI
><P
>&#13;             Returns 1 if the sign string precedes the quantity and currency_symbol.
            </P
></LI
><LI
><P
>&#13;             Returns 2 if the sign string follows the quantity and currency_symbol.
            </P
></LI
><LI
><P
>&#13;             Returns 3 if the sign string immediately precedes the currency_symbol.
            </P
></LI
><LI
><P
>&#13;             Returns 4 if the sign string immediately follows the currency_symbol.
            </P
></LI
></UL
>
         </TD
></TR
><TR
><TD
>N_SIGN_POSN</TD
></TR
><TR
><TD
COLSPAN="2"
ALIGN="center"
><SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>LC_NUMERIC Category Constants</I
></SPAN
></TD
></TR
><TR
><TD
>DECIMAL_POINT</TD
><TD
>Decimal point character.</TD
></TR
><TR
><TD
>RADIXCHAR</TD
><TD
>Same value as DECIMAL_POINT.</TD
></TR
><TR
><TD
>THOUSANDS_SEP</TD
><TD
>Separator character for thousands (groups of three digits).</TD
></TR
><TR
><TD
>THOUSEP</TD
><TD
>Same value as THOUSANDS_SEP.</TD
></TR
><TR
><TD
>GROUPING</TD
><TD
>&nbsp;</TD
></TR
><TR
><TD
COLSPAN="2"
ALIGN="center"
><SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>LC_MESSAGES Category Constants</I
></SPAN
></TD
></TR
><TR
><TD
>YESEXPR</TD
><TD
>Regex string for matching 'yes' input.</TD
></TR
><TR
><TD
>NOEXPR</TD
><TD
>Regex string for matching 'no' input.</TD
></TR
><TR
><TD
>YESSTR</TD
><TD
>Output string for 'yes'.</TD
></TR
><TR
><TD
>NOSTR</TD
><TD
>Output string for 'no'.</TD
></TR
><TR
><TD
COLSPAN="2"
ALIGN="center"
><SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>LC_CTYPE Category Constants</I
></SPAN
></TD
></TR
><TR
><TD
>CODESET</TD
><TD
>Return a string with the name of the character encoding.</TD
></TR
></TBODY
></TABLE
></DIV
>
    </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>注意: </B
>本函数未在 Windows 平台下实现。</P
></BLOCKQUOTE
></DIV
><P
>&#13;     See also <A
HREF="function.setlocale.html"
><B
CLASS="function"
>setlocale()</B
></A
> and
     <A
HREF="function.localeconv.html"
><B
CLASS="function"
>localeconv()</B
></A
>.
    </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.money-format.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>起始页</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.nl2br.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>money_format</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.strings.html"
ACCESSKEY="U"
>上一级</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>nl2br</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>