<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.gettext.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.textdomain.php',
    1 => 'textdomain',
    2 => 'Sets the default domain',
  ),
  'up' => 
  array (
    0 => 'ref.gettext.php',
    1 => 'Gettext Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.ngettext.php',
    1 => 'ngettext',
  ),
  'next' => 
  array (
    0 => 'book.iconv.php',
    1 => 'iconv',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/gettext/functions/textdomain.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.textdomain" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">textdomain</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">textdomain</span> &mdash; <span class="dc-title">Sets the default domain</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.textdomain-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>textdomain</strong></span>(<span class="methodparam"><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> <code class="parameter">$domain</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="para rdfs-comment">
   This function sets the domain to search within when calls are
   made to <span class="function"><a href="function.gettext.php" class="function">gettext()</a></span>, usually the named after an
   application.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.textdomain-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">domain</code></dt>
     <dd>
      <p class="para">
       The new message domain, or <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> to get the current setting without
       changing it
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.textdomain-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   If successful, this function returns the current message
   domain, after possibly changing it.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.textdomain-errors">
  <h3 class="title">Errori/Eccezioni</h3>
  <p class="simpara">
   Throws a <span class="exceptionname"><a href="class.valueerror.php" class="exceptionname">ValueError</a></span> if <code class="parameter">domain</code>
   is the empty <span class="type"><a href="language.types.string.php" class="type string">string</a></span>.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.textdomain-changelog">
  <h3 class="title">Log delle modifiche</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Versione</th>
      <th>Descrizione</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.4.0</td>
      <td>
       Now throws a <span class="exceptionname"><a href="class.valueerror.php" class="exceptionname">ValueError</a></span> if <code class="parameter">domain</code>
       is the empty <span class="type"><a href="language.types.string.php" class="type string">string</a></span>.
      </td>
     </tr>

     <tr>
      <td>8.4.0</td>
      <td>
       <code class="parameter">domain</code> is optional now.
       Previously, the parameter always had to be specified.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 notes" id="refsect1-function.textdomain-notes">
  <h3 class="title">Note</h3>
  <blockquote class="note"><p><strong class="note">Nota</strong>: 
   <p class="para">
    The <span class="function"><strong>textdomain()</strong></span> information is maintained per process,
    not per thread.
   </p>
  </p></blockquote>
 </div>

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