<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.locale.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'locale.canonicalize.php',
    1 => 'Locale::canonicalize',
    2 => 'Canonicalize the locale string',
  ),
  'up' => 
  array (
    0 => 'class.locale.php',
    1 => 'Locale',
  ),
  'prev' => 
  array (
    0 => 'locale.acceptfromhttp.php',
    1 => 'Locale::acceptFromHttp',
  ),
  'next' => 
  array (
    0 => 'locale.composelocale.php',
    1 => 'Locale::composeLocale',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/intl/locale/canonicalize.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="locale.canonicalize" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Locale::canonicalize</h1>
  <h1 class="refname">locale_canonicalize</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8, PECL intl &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">Locale::canonicalize</span> -- <span class="refname">locale_canonicalize</span> &mdash; <span class="dc-title">Canonicalize the locale string</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-locale.canonicalize-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><strong>Locale::canonicalize</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$locale</code></span>): <span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span></div>

  <p class="simpara">
   Canonicalizes the passed locale string to ICU format.
  </p>
  <p class="simpara">
   This does not necessarily indicate or return a valid locale. It is only a
   version of the input that has been canonicalized according to ICU rules.
  </p>
  <p class="simpara">
   The behavior of this function depends on the version of ICU PHP is using
   (<strong><code><a href="intl.constants.php#constant.intl-icu-version">INTL_ICU_VERSION</a></code></strong>).
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-locale.canonicalize-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <dl>
   
    <dt><code class="parameter">locale</code></dt>
    <dd>
     <span class="simpara">
      Original locale string.
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-locale.canonicalize-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   Canonicalized locale string.
  </p>
  <p class="para">Returns <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> when the length of <code class="parameter">locale</code> exceeds <strong><code><a href="intl.constants.php#constant.intl-max-locale-len">INTL_MAX_LOCALE_LEN</a></code></strong>.</p>
 </div>


 <div class="refsect1 examples" id="refsect1-locale.canonicalize-examples">
  <h3 class="title">Esempi</h3>
  <div class="example" id="example-1">
   <p><strong>Example #1 <span class="function"><strong>locale_canonicalize()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">echo Locale::canonicalize('en-US.utf8') . "\n";<br />echo Locale::canonicalize('totally-not-valid') . "\n";</span></code></div>
   </div>

  </div>
  <p class="para">Il precedente esempio visualizzerà
qualcosa simile a:</p>
  <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">en_US
totally_NOT_VALID</pre>
</div>
  </div>
 </div>

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