<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.strings.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.localeconv.php',
    1 => 'localeconv',
    2 => 'Get numeric formatting information',
  ),
  'up' => 
  array (
    0 => 'ref.strings.php',
    1 => 'String Функції',
  ),
  'prev' => 
  array (
    0 => 'function.levenshtein.php',
    1 => 'levenshtein',
  ),
  'next' => 
  array (
    0 => 'function.ltrim.php',
    1 => 'ltrim',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/strings/functions/localeconv.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.localeconv" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">localeconv</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.5, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">localeconv</span> &mdash; <span class="dc-title">Get numeric formatting information</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.localeconv-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>localeconv</strong></span>(): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>

  <p class="para rdfs-comment">
   Returns an associative array containing localized numeric and
   monetary formatting information.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.localeconv-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">У цієї функції немає
параметрів.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.localeconv-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   <span class="function"><strong>localeconv()</strong></span> returns data based upon the current locale
   as set by <span class="function"><a href="function.setlocale.php" class="function">setlocale()</a></span>.  The associative array that is
   returned contains the following fields:
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Array element</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>decimal_point</td>
       <td>Decimal point character</td>
      </tr>

      <tr>
       <td>thousands_sep</td>
       <td>Thousands separator</td>
      </tr>

      <tr>
       <td>grouping</td>
       <td>Array containing numeric groupings</td>
      </tr>

      <tr>
       <td>int_curr_symbol</td>
       <td>International currency symbol (i.e. USD)</td>
      </tr>

      <tr>
       <td>currency_symbol</td>
       <td>Local currency symbol (i.e. $)</td>
      </tr>

      <tr>
       <td>mon_decimal_point</td>
       <td>Monetary decimal point character</td>
      </tr>

      <tr>
       <td>mon_thousands_sep</td>
       <td>Monetary thousands separator</td>
      </tr>

      <tr>
       <td>mon_grouping</td>
       <td>Array containing monetary groupings</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>
        <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if currency_symbol precedes a positive value, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>
        if it succeeds one
       </td>
      </tr>

      <tr>
       <td>p_sep_by_space</td>
       <td>
        <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if a space separates currency_symbol from a positive
        value, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> otherwise
       </td>
      </tr>

      <tr>
       <td>n_cs_precedes</td>
       <td>
        <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if currency_symbol precedes a negative value, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>
        if it succeeds one
       </td>
      </tr>

      <tr>
       <td>n_sep_by_space</td>
       <td>
        <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if a space separates currency_symbol from a negative
        value, <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> otherwise
       </td>
      </tr>

      <tr style="vertical-align: top;">
       <td>p_sign_posn</td>
       <td>
        <ul class="simplelist">
         <li>0 - Parentheses surround the quantity and currency_symbol</li>
         <li>1 - The sign string precedes the quantity and currency_symbol</li>
         <li>2 - The sign string succeeds the quantity and currency_symbol</li>
         <li>3 - The sign string immediately precedes the currency_symbol</li>
         <li>4 - The sign string immediately succeeds the currency_symbol</li>
        </ul>
       </td>
      </tr>

      <tr style="vertical-align: top;">
       <td>n_sign_posn</td>
       <td>
        <ul class="simplelist">
         <li>0 - Parentheses surround the quantity and currency_symbol</li>
         <li>1 - The sign string precedes the quantity and currency_symbol</li>
         <li>2 - The sign string succeeds the quantity and currency_symbol</li>
         <li>3 - The sign string immediately precedes the currency_symbol</li>
         <li>4 - The sign string immediately succeeds the currency_symbol</li>
        </ul>
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
  <p class="para">
   The <code class="literal">p_sign_posn</code>, and <code class="literal">n_sign_posn</code> contain a string
   of formatting options. Each number representing one of the above listed conditions.
  </p>
  <p class="para">
   The grouping fields contain arrays that define the way numbers should be
   grouped. For example, the monetary grouping field for the nl_NL locale (in
   UTF-8 mode with the euro sign), 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 <strong><code><a href="string.constants.php#constant.char-max">CHAR_MAX</a></code></strong>,
   no further grouping is done. If an array element is equal to 0, the previous
   element should be used.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.localeconv-examples">
  <h3 class="title">Приклади</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Приклад #1 <span class="function"><strong>localeconv()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">if (</span><span style="color: #0000BB">false </span><span style="color: #007700">!== </span><span style="color: #0000BB">setlocale</span><span style="color: #007700">(</span><span style="color: #0000BB">LC_ALL</span><span style="color: #007700">, </span><span style="color: #DD0000">'nl_NL.UTF-8@euro'</span><span style="color: #007700">)) {<br />    </span><span style="color: #0000BB">$locale_info </span><span style="color: #007700">= </span><span style="color: #0000BB">localeconv</span><span style="color: #007700">();<br />    </span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$locale_info</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Поданий вище приклад
виведе:</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">Array
(
    [decimal_point] =&gt; .
    [thousands_sep] =&gt;
    [int_curr_symbol] =&gt; EUR
    [currency_symbol] =&gt; €
    [mon_decimal_point] =&gt; ,
    [mon_thousands_sep] =&gt;
    [positive_sign] =&gt;
    [negative_sign] =&gt; -
    [int_frac_digits] =&gt; 2
    [frac_digits] =&gt; 2
    [p_cs_precedes] =&gt; 1
    [p_sep_by_space] =&gt; 1
    [n_cs_precedes] =&gt; 1
    [n_sep_by_space] =&gt; 1
    [p_sign_posn] =&gt; 1
    [n_sign_posn] =&gt; 2
    [grouping] =&gt; Array
        (
        )

    [mon_grouping] =&gt; Array
        (
            [0] =&gt; 3
            [1] =&gt; 3
        )

)</pre>
</div>
    </div>
   </div>   
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.localeconv-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.setlocale.php" class="function" rel="rdfs-seeAlso">setlocale()</a> - Set locale information</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>