php-doc-en/reference/enchant/functions/enchant-dict-add.xml
2020-12-31 14:17:31 +01:00

111 lines
2.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.enchant-dict-add" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>enchant_dict_add</refname>
<refpurpose>Add a word to personal word list</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>void</type><methodname>enchant_dict_add</methodname>
<methodparam><type>EnchantDictionary</type><parameter>dictionary</parameter></methodparam>
<methodparam><type>string</type><parameter>word</parameter></methodparam>
</methodsynopsis>
<para>
Add a word to personal word list of the given dictionary.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
&enchant.param.dictionary;
<varlistentry>
<term><parameter>word</parameter></term>
<listitem>
<para>
The word to add
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
&enchant.changelog.dictionary-param;
</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 role="examples">
<example>
<title>Adding a word to a PWL</title>
<programlisting role="php">
<![CDATA[
<?php
$filename = './my_word_list.pwl';
$word = 'Supercalifragilisticexpialidocious';
$broker = enchant_broker_init();
$dict = enchant_broker_request_pwl_dict($broker, $filename);
enchant_dict_add($dict, $word);
enchant_broker_free($broker);
?>
]]>
</programlisting>
</example>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>enchant_broker_request_pwl_dict</function></member>
<member><function>enchant_broker_request_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
-->