<?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 => 'fr',
  ),
  'this' => 
  array (
    0 => 'function.localeconv.php',
    1 => 'localeconv',
    2 => 'Lit la configuration locale',
  ),
  'up' => 
  array (
    0 => 'ref.strings.php',
    1 => 'Fonctions sur les cha&icirc;nes de caract&egrave;res',
  ),
  'prev' => 
  array (
    0 => 'function.levenshtein.php',
    1 => 'levenshtein',
  ),
  'next' => 
  array (
    0 => 'function.ltrim.php',
    1 => 'ltrim',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    '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">Lit la configuration locale</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.localeconv-description">
  <h3 class="title">Description</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">
   Retourne un tableau associatif contenant les informations de formats
   localisées pour les nombres et la monnaie.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.localeconv-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">Cette fonction ne contient aucun paramètre.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.localeconv-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   <span class="function"><strong>localeconv()</strong></span> retourne les formats en fonction
   de la configuration effectuée avec <span class="function"><a href="function.setlocale.php" class="function">setlocale()</a></span>.
   Le tableau associatif qui est retourné contient les index
   suivants :
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Index du tableau</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>decimal_point</td>
       <td>Séparateur décimal</td>
      </tr>

      <tr>
       <td>thousands_sep</td>
       <td>Séparateur de milliers</td>
      </tr>

      <tr>
       <td>grouping</td>
       <td>Tableau contenant les regroupements numériques</td>
      </tr>

      <tr>
       <td>int_curr_symbol</td>
       <td>Symbole monétaire international (c.-à-d. EUR)</td>
      </tr>

      <tr>
       <td>currency_symbol</td>
       <td>Symbole monétaire local (c.-à-d. ¤)</td>
      </tr>

      <tr>
       <td>mon_decimal_point</td>
       <td>Séparateur décimal monétaire</td>
      </tr>

      <tr>
       <td>mon_thousands_sep</td>
       <td>Séparateur de milliers monétaires</td>
      </tr>

      <tr>
       <td>mon_grouping</td>
       <td>Tableau contenant les regroupements numériques monétaires</td>
      </tr>

      <tr>
       <td>positive_sign</td>
       <td>Signe des valeurs positives</td>
      </tr>

      <tr>
       <td>negative_sign</td>
       <td>Signe des valeurs négatives</td>
      </tr>

      <tr>
       <td>int_frac_digits</td>
       <td>Nombre international de décimales</td>
      </tr>

      <tr>
       <td>frac_digits</td>
       <td>Nombre local de décimales</td>
      </tr>

      <tr>
       <td>p_cs_precedes</td>
       <td>
        <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> si currency_symbol précède une valeur
        positive et <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> s&#039;il lui succède.
       </td>
      </tr>

      <tr>
       <td>p_sep_by_space</td>
       <td>
        <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> si un espace sépare currency_symbol
        d&#039;une valeur positive, et <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> sinon.
       </td>
      </tr>

      <tr>
       <td>n_cs_precedes</td>
       <td>
        <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> si currency_symbol précède une
        valeur négative, et <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> s&#039;il lui succède.
       </td>
      </tr>

      <tr>
       <td>n_sep_by_space</td>
       <td>
        <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> si un espace sépare currency_symbol
        d&#039;une valeur négative, et <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> sinon.
       </td>
      </tr>

      <tr style="vertical-align: top;">
       <td>p_sign_posn</td>
       <td>
        <ul class="simplelist">
         <li>0 - Des parenthèses entourent la valeur et le symbole monétaire</li>
         <li>1 - Le signe précède la valeur et le symbole monétaire</li>
         <li>2 - Le signe suit la valeur et le symbole monétaire</li>
         <li>3 - Le signe précède immédiatement la valeur et le symbole monétaire</li>
         <li>4 - Le signe suit immédiatement la valeur et le symbole monétaire</li>
        </ul>
       </td>
      </tr>

      <tr style="vertical-align: top;">
       <td>n_sign_posn</td>
       <td>
        <ul class="simplelist">
         <li>0 - Des parenthèses entourent la valeur et le symbole monétaire</li>
         <li>1 - Le signe précède la valeur et le symbole monétaire</li>
         <li>2 - Le signe suit la valeur et le symbole monétaire</li>
         <li>3 - Le signe précède immédiatement la valeur et le symbole monétaire</li>
         <li>4 - Le signe suit immédiatement la valeur et le symbole monétaire</li>
        </ul>
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
  <p class="para">
   Les champs <code class="literal">p_sign_posn</code> et <code class="literal">n_sign_posn</code> contiennent
   une chaîne formatée d&#039;options. Chaque nombre représente une des conditions listées
   ci-dessus.
  </p>
  <p class="para">
   Les champs de regroupements contiennent des tableaux qui
   définissent la manière dont les nombres doivent être regroupés.
   Par exemple, le champ de regroupement monétaire pour
   nl_NL (en mode UTF-8 avec le signe euro),
   contiendra deux éléments, avec les valeurs 3 et
   3. Si un élément de tableau contient
   <strong><code><a href="string.constants.php#constant.char-max">CHAR_MAX</a></code></strong>, aucun autre regroupement n&#039;est fait.
   Si un élément de tableau contient 0, l&#039;élément
   précédent doit être utilisé.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.localeconv-examples">
  <h3 class="title">Exemples</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Exemple #1 Exemple avec <span class="function"><strong>localeconv()</strong></span></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>L&#039;exemple ci-dessus va afficher :</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">Voir aussi</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.setlocale.php" class="function" rel="rdfs-seeAlso">setlocale()</a> - Modifie les informations de localisation</span></li>
   </ul>
  </p>
 </div>


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