<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.enchant-broker-request-dict" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>enchant_broker_request_dict</refname>
  <refpurpose>Create a new dictionary using a tag</refpurpose>
 </refnamediv>
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type class="union"><type>EnchantDictionary</type><type>false</type></type><methodname>enchant_broker_request_dict</methodname>
   <methodparam><type>EnchantBroker</type><parameter>broker</parameter></methodparam>
   <methodparam><type>string</type><parameter>tag</parameter></methodparam>
  </methodsynopsis>
  <para>
   create a new dictionary using tag, the non-empty language tag you
   wish to request a dictionary for ("en_US", "de_DE", ...)
  </para>
 </refsect1>
 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    &enchant.param.broker;
    <varlistentry>
     <term><parameter>tag</parameter></term>
     <listitem>
      <para>
       A tag describing the locale, for example en_US, de_DE
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   Returns a dictionary resource on success&return.falseforfailure;.
  </para>
 </refsect1>

 <refsect1 role="changelog">
  &reftitle.changelog;
  <informaltable>
   <tgroup cols="2">
    <thead>
     <row>
      <entry>&Version;</entry>
      <entry>&Description;</entry>
     </row>
    </thead>
    <tbody>
     &enchant.changelog.broker-param;
     <row>
      <entry>8.0.0</entry>
      <entry>
       On success, this function returns an <classname>EnchantDictionary</classname> instance now;
       previoulsy, a &resource; was retured.
      </entry>
     </row>
    </tbody>
   </tgroup>
  </informaltable>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <para>
   <example>
    <title>A <function>enchant_broker_request_dict</function> example</title>
    <para>
     Check if a dictionary exists using
     <function>enchant_broker_dict_exists</function> and request it.
    </para>
    <programlisting role="php">
<![CDATA[
<?php
$tag = 'en_US';
$broker = enchant_broker_init();
if (enchant_broker_dict_exists($broker,$tag)) {
    $dict = enchant_broker_request_dict($r, $tag);
}
?>
]]>
    </programlisting>
   </example>
  </para>
 </refsect1>


 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>enchant_dict_describe</function></member>
    <member><function>enchant_broker_dict_exists</function></member>
    <member><function>enchant_broker_free_dict</function></member>
   </simplelist>
  </para>
 </refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
