mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-04-01 00:38:55 +00:00

- All id attributes are now xml:id - Add docbook namespace to all root elements - Replace <ulink /> with <link xlink:href /> - Minor markup fixes here and there git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@238160 c90b9560-bf6c-de11-be94-00142212c4b1
148 lines
4.1 KiB
XML
148 lines
4.1 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.4 $ -->
|
|
<!-- Purpose: international -->
|
|
<!-- Membership: pecl, external -->
|
|
<reference xml:id="ref.enchant" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<title>enchant Functions</title>
|
|
<titleabbrev>enchant</titleabbrev>
|
|
|
|
<partintro>
|
|
<section xml:id="enchant.intro">
|
|
&reftitle.intro;
|
|
<para>
|
|
Enchant is the PHP binding for the
|
|
<link xlink:href="&url.enchant;">Enchant library</link>. Enchant steps
|
|
in to provide uniformity and conformity on top of all spelling
|
|
libraries, and implement certain features that may be lacking in
|
|
any individual provider library. Everything should "just work"
|
|
for any and every definition of "just working."
|
|
</para>
|
|
<para>
|
|
Enchat supports the following backends:
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
<literal>Aspell/Pspell (intends to replace Ispell)</literal>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
<literal>Ispell (old as sin, could be interpreted as a defacto standard)</literal>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
<literal>MySpell/Hunspell (an OOo projects, also used by Mozilla)</literal>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
<literal>Uspell (primarily Yiddish, Hebrew, and Eastern European languages - hosted in AbiWord's CVS under the module "uspell")</literal>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
<literal>Hspell (Hebrew)</literal>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
<literal>AppleSpell (Mac OSX)</literal>
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</para>
|
|
</section>
|
|
<section xml:id="enchant.requirements">
|
|
&reftitle.required;
|
|
<para>
|
|
This version uses the functions of the
|
|
<link xlink:href="&url.enchant;">Enchant library</link> by
|
|
Dom Lachowicz. You need Enchant 1.2.4 or later.
|
|
</para>
|
|
</section>
|
|
<section xml:id="enchant.installation">
|
|
&reftitle.install;
|
|
<para>
|
|
&pecl.info;
|
|
<link xlink:href="&url.pecl.package;enchant">&url.pecl.package;enchant</link>.
|
|
</para>
|
|
</section>
|
|
<!-- Information found in configure.xml -->
|
|
<!-- reference.enchant.configure; -->
|
|
<!-- Information found in ini.xml -->
|
|
<!-- reference.enchant.ini; -->
|
|
|
|
<section xml:id="enchant.configuration">
|
|
&reftitle.runtime;
|
|
&no.config;
|
|
</section>
|
|
<section xml:id="enchant.resources">
|
|
&reftitle.resources;
|
|
<para>
|
|
There are two types of resources in this extension. The first
|
|
one is the broker (backends manager) and the second is for the
|
|
dictionary.
|
|
</para>
|
|
</section>
|
|
|
|
<section xml:id="enchant.examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title>Enchant Usage Example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$tag = 'en_US';
|
|
$r = enchant_broker_init();
|
|
$bprovides = enchant_broker_describe($r);
|
|
echo "Current broker provides the following backend(s):\n";
|
|
print_r($bprovides);
|
|
|
|
$dicts = enchant_broker_list_dicts($r);
|
|
print_r($dicts);
|
|
if (enchant_broker_dict_exists($r,$tag)) {
|
|
$d = enchant_broker_request_dict($r, $tag);
|
|
$dprovides = enchant_dict_describe($d);
|
|
echo "dictionary $tag provides:\n";
|
|
$spellerrors = enchant_dict_check($d, "soong");
|
|
print_r($dprovides);
|
|
echo "found $spellerrors spell errors\n";
|
|
if ($spellerrors) {
|
|
$suggs = enchant_dict_suggest($d, "soong");
|
|
echo "Suggestions for 'soong':";
|
|
print_r($suggs);
|
|
}
|
|
enchant_broker_free_dict($d);
|
|
} else {
|
|
}
|
|
enchant_broker_free($r);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</section>
|
|
</partintro>
|
|
&reference.enchant.functions;
|
|
</reference>
|
|
|
|
<!-- 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:"../../../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
|
|
-->
|