<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.enchant.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'function.enchant-broker-request-dict.php',
    1 => 'enchant_broker_request_dict',
    2 => 'Create a new dictionary using a tag',
  ),
  'up' => 
  array (
    0 => 'ref.enchant.php',
    1 => 'Enchant Functions',
  ),
  'prev' => 
  array (
    0 => 'function.enchant-broker-list-dicts.php',
    1 => 'enchant_broker_list_dicts',
  ),
  'next' => 
  array (
    0 => 'function.enchant-broker-request-pwl-dict.php',
    1 => 'enchant_broker_request_pwl_dict',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/enchant/functions/enchant-broker-request-dict.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.enchant-broker-request-dict" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">enchant_broker_request_dict</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8, PECL enchant &gt;= 0.1.0 )</p><p class="refpurpose"><span class="refname">enchant_broker_request_dict</span> &mdash; <span class="dc-title">Create a new dictionary using a tag</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.enchant-broker-request-dict-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>enchant_broker_request_dict</strong></span>(<span class="methodparam"><span class="type"><a href="class.enchantbroker.php" class="type EnchantBroker">EnchantBroker</a></span> <code class="parameter">$broker</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$tag</code></span>): <span class="type"><span class="type"><a href="class.enchantdictionary.php" class="type EnchantDictionary">EnchantDictionary</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="simpara">
   create a new dictionary using tag, the non-empty language tag you
   wish to request a dictionary for (&quot;en_US&quot;, &quot;de_DE&quot;, ...)
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.enchant-broker-request-dict-parameters">
  <h3 class="title">Parameters</h3>
  <dl>
   
     <dt><code class="parameter">broker</code></dt>
     <dd>
      <p class="para">
       An Enchant broker returned by <span class="function"><a href="function.enchant-broker-init.php" class="function">enchant_broker_init()</a></span>.
      </p>
     </dd>
    
   
    <dt><code class="parameter">tag</code></dt>
    <dd>
     <span class="simpara">
      A tag describing the locale, for example en_US, de_DE
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.enchant-broker-request-dict-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="simpara">
   Returns a dictionary resource on success or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> on failure.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.enchant-broker-request-dict-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.0.0</td>
 <td>
  <code class="parameter">broker</code> expects an <span class="classname"><a href="class.enchantbroker.php" class="classname">EnchantBroker</a></span> instance now;
  previoulsy, a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> was expected.
 </td>
</tr>

     <tr>
      <td>8.0.0</td>
      <td>
       On success, this function returns an <span class="classname"><a href="class.enchantdictionary.php" class="classname">EnchantDictionary</a></span> instance now;
       previously, a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> was returned.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.enchant-broker-request-dict-examples">
  <h3 class="title">Examples</h3>
  <div class="example" id="example-1">
   <p><strong>Example #1 A <span class="function"><strong>enchant_broker_request_dict()</strong></span> example</strong></p>
   <div class="example-contents"><p>
    Check if a dictionary exists using
    <span class="function"><a href="function.enchant-broker-dict-exists.php" class="function">enchant_broker_dict_exists()</a></span> and request it.
   </p></div>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$tag </span><span style="color: #007700">= </span><span style="color: #DD0000">'en_US'</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$broker </span><span style="color: #007700">= </span><span style="color: #0000BB">enchant_broker_init</span><span style="color: #007700">();<br />if (</span><span style="color: #0000BB">enchant_broker_dict_exists</span><span style="color: #007700">(</span><span style="color: #0000BB">$broker</span><span style="color: #007700">,</span><span style="color: #0000BB">$tag</span><span style="color: #007700">)) {<br />    </span><span style="color: #0000BB">$dict </span><span style="color: #007700">= </span><span style="color: #0000BB">enchant_broker_request_dict</span><span style="color: #007700">(</span><span style="color: #0000BB">$broker</span><span style="color: #007700">, </span><span style="color: #0000BB">$tag</span><span style="color: #007700">);<br />    </span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$dict</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.enchant-broker-request-dict-seealso">
  <h3 class="title">See Also</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.enchant-dict-describe.php" class="function" rel="rdfs-seeAlso">enchant_dict_describe()</a> - Describes an individual dictionary</span></li>
   <li><span class="function"><a href="function.enchant-broker-dict-exists.php" class="function" rel="rdfs-seeAlso">enchant_broker_dict_exists()</a> - Whether a dictionary exists or not. Using non-empty tag</span></li>
   <li><span class="function"><a href="function.enchant-broker-free-dict.php" class="function" rel="rdfs-seeAlso">enchant_broker_free_dict()</a> - Free a dictionary resource</span></li>
  </ul>
 </div>

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