Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > a34ed6838d4b29d38abd504392a4a797 > files > 1319

php-manual-es-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>localeconv</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Manual de PHP"
HREF="index.html"><LINK
REL="UP"
TITLE="Funciones de cadenas"
HREF="ref.strings.html"><LINK
REL="PREVIOUS"
TITLE="levenshtein"
HREF="function.levenshtein.html"><LINK
REL="NEXT"
TITLE="ltrim"
HREF="function.ltrim.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></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"
>Manual de PHP</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.levenshtein.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.ltrim.html"
ACCESSKEY="N"
>Siguiente</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.localeconv"
></A
>localeconv</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN74812"
></A
><P
>    (PHP 4 &#62;= 4.0.5)</P
>localeconv&nbsp;--&nbsp;Get numeric formatting information</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN74815"
></A
><H2
>Description</H2
>array <B
CLASS="methodname"
>localeconv</B
> ( void)<BR
></BR
><P
>&#13;     Returns an associative array containing localized numeric and
     monetary formatting information.
    </P
><P
>&#13;     <B
CLASS="function"
>localeconv()</B
> returns data based upon the current locale
     as set by <A
HREF="function.setlocale.html"
><B
CLASS="function"
>setlocale()</B
></A
>.  The associative array that is
     returned contains the following fields:
     <DIV
CLASS="informaltable"
><A
NAME="AEN74825"
></A
><P
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><THEAD
><TR
><TH
ALIGN="LEFT"
VALIGN="MIDDLE"
>Array element</TH
><TH
ALIGN="LEFT"
VALIGN="MIDDLE"
>Description</TH
></TR
></THEAD
><TBODY
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>decimal_point</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Decimal point character</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>thousands_sep</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Thousands separator</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>grouping</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Array containing numeric groupings</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>int_curr_symbol</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>International currency symbol (i.e. USD)</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>currency_symbol</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Local currency symbol (i.e. $)</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>mon_decimal_point</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Monetary decimal point character</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>mon_thousands_sep</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Monetary thousands separator</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>mon_grouping</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Array containing monetary groupings</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>positive_sign</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Sign for positive values</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>negative_sign</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Sign for negative values</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>int_frac_digits</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>International fractional digits</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>frac_digits</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>Local fractional digits</TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>p_cs_precedes</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;          <TT
CLASS="constant"
><B
>TRUE</B
></TT
> if currency_symbol precedes a positive value, <TT
CLASS="constant"
><B
>FALSE</B
></TT
>
          if it succeeds one
         </TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>p_sep_by_space</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;          <TT
CLASS="constant"
><B
>TRUE</B
></TT
> if a space separates currency_symbol from a positive
          value, <TT
CLASS="constant"
><B
>FALSE</B
></TT
> otherwise
         </TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>n_cs_precedes</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;          <TT
CLASS="constant"
><B
>TRUE</B
></TT
> if currency_symbol precedes a negative value, <TT
CLASS="constant"
><B
>FALSE</B
></TT
>
          if it succeeds one
         </TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>n_sep_by_space</TD
><TD
ALIGN="LEFT"
VALIGN="MIDDLE"
>&#13;          <TT
CLASS="constant"
><B
>TRUE</B
></TT
> if a space separates currency_symbol from a negative
          value, <TT
CLASS="constant"
><B
>FALSE</B
></TT
> otherwise
         </TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
>p_sign_posn</TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
>&#13;	   <P
></P
><TABLE
BORDER="0"
><TBODY
><TR
><TD
>0</TD
><TD
>&#13;	     Parentheses surround the quantity and currency_symbol</TD
></TR
><TR
><TD
>1</TD
><TD
>&#13;	     The sign string precedes the quantity and currency_symbol
	    </TD
></TR
><TR
><TD
>2</TD
><TD
>&#13;	     The sign string succeeds the quantity and currency_symbol
	    </TD
></TR
><TR
><TD
>3</TD
><TD
>&#13;	     The sign string immediately precedes the currency_symbol
	    </TD
></TR
><TR
><TD
>4</TD
><TD
>&#13;	     The sign string immediately succeeds the currency_symbol
	    </TD
></TR
></TBODY
></TABLE
><P
></P
>
	 </TD
></TR
><TR
><TD
ALIGN="LEFT"
VALIGN="TOP"
>n_sign_posn</TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
>&#13;	   <P
></P
><TABLE
BORDER="0"
><TBODY
><TR
><TD
>0</TD
><TD
>&#13;	     Parentheses surround the quantity and currency_symbol
	    </TD
></TR
><TR
><TD
>1</TD
><TD
>&#13;	     The sign string precedes the quantity and currency_symbol
	    </TD
></TR
><TR
><TD
>2</TD
><TD
>&#13;	     The sign string succeeds the quantity and currency_symbol
	    </TD
></TR
><TR
><TD
>3</TD
><TD
>&#13;	     The sign string immediately precedes the currency_symbol
	    </TD
></TR
><TR
><TD
>4</TD
><TD
>The sign string immediately succeeds the currency_symbol
	    </TD
></TR
></TBODY
></TABLE
><P
></P
>
	 </TD
></TR
></TBODY
></TABLE
><P
></P
></DIV
>
    </P
><P
>&#13;     The grouping fields contain arrays that define the way numbers
     should be grouped.  For example, the grouping field for the en_US
     locale, would contain a 2 item array with the values 3 and 3.
     The higher the index in the array, the farther left the grouping
     is.  If an array element is equal to CHAR_MAX, no further
     grouping is done.  If an array element is equal to 0, the
     previous element should be used.
    </P
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN74917"
></A
><P
><B
>Ejemplo 1. <B
CLASS="function"
>localeconv()</B
> example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>setlocale(LC_ALL, "en_US");

$locale_info = localeconv();

echo "&#60;PRE&#62;\n";
echo "--------------------------------------------\n";
echo "  Monetary information for current locale:  \n";
echo "--------------------------------------------\n\n";

echo "int_curr_symbol:   {$locale_info["int_curr_symbol"]}\n";
echo "currency_symbol:   {$locale_info["currency_symbol"]}\n";
echo "mon_decimal_point: {$locale_info["mon_decimal_point"]}\n";
echo "mon_thousands_sep: {$locale_info["mon_thousands_sep"]}\n";
echo "positive_sign:     {$locale_info["positive_sign"]}\n";
echo "negative_sign:     {$locale_info["negative_sign"]}\n";
echo "int_frac_digits:   {$locale_info["int_frac_digits"]}\n";
echo "frac_digits:       {$locale_info["frac_digits"]}\n";
echo "p_cs_precedes:     {$locale_info["p_cs_precedes"]}\n";
echo "p_sep_by_space:    {$locale_info["p_sep_by_space"]}\n";
echo "n_cs_precedes:     {$locale_info["n_cs_precedes"]}\n";
echo "n_sep_by_space:    {$locale_info["n_sep_by_space"]}\n";
echo "p_sign_posn:       {$locale_info["p_sign_posn"]}\n";
echo "n_sign_posn:       {$locale_info["n_sign_posn"]}\n";
echo "&#60;/PRE&#62;\n";</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
><P
>&#13;     The constant CHAR_MAX is also defined for the use mentioned above.
    </P
><P
>&#13;     See also <A
HREF="function.setlocale.html"
><B
CLASS="function"
>setlocale()</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.levenshtein.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Inicio</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.ltrim.html"
ACCESSKEY="N"
>Siguiente</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>levenshtein</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.strings.html"
ACCESSKEY="U"
>Subir</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>ltrim</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>