mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-25 17:32:07 +01:00
192 lines
6.2 KiB
XML
192 lines
6.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: 46364d741c835165e66564a1b17f33487cf923d2 Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: yes -->
|
|
<refentry xml:id="function.pspell-new" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>pspell_new</refname>
|
|
<refpurpose>Charge un nouveau dictionnaire</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type class="union"><type>PSpell\Dictionary</type><type>false</type></type><methodname>pspell_new</methodname>
|
|
<methodparam><type>string</type><parameter>language</parameter></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>spelling</parameter><initializer>""</initializer></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>jargon</parameter><initializer>""</initializer></methodparam>
|
|
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter><initializer>""</initializer></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer>0</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>pspell_new</function> ouvre un nouveau dictionnaire et
|
|
retourne un instance de <classname>PSpell\Dictionary</classname>, pour être utilisé avec d'autres
|
|
fonctions pspell.
|
|
</para>
|
|
<para>
|
|
Pour plus d'informations et d'exemples, reportez-vous au site
|
|
<link xlink:href="&url.pspell;">&url.pspell;</link>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>language</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Le paramètre de langue <parameter>spelling</parameter> est constitué des
|
|
deux lettres du codage de langue ISO 639, et du codage optionnel de pays ISO
|
|
3166, séparés par un '_'.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>spelling</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Ce paramètre est nécessaire pour les langues
|
|
qui ont plus d'une orthographe, comme l'anglais ou le français.
|
|
Les valeurs reconnues sont
|
|
'american', 'british', et 'canadian'.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>jargon</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Le paramètre <parameter>jargon</parameter> contient des
|
|
informations supplémentaires pour distinguer deux listes de
|
|
mots qui ont le même marquage de langue et d'orthographe.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>encoding</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Le paramètre <parameter>encoding</parameter> est le type d'encodage des mots.
|
|
Les valeurs valides sont 'utf-8', 'iso8859-*', 'koi8-r', 'viscii',
|
|
'cp1252', 'machine unsigned 16', 'machine unsigned 32'. Ce paramètre n'ayant pas été testé de
|
|
façon exhaustive, il convient d'être prudent lors de son
|
|
utilisation.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>mode</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Le paramètre <parameter>mode</parameter> est le mode de travail du vérificateur
|
|
d'orthographe. Plusieurs modes sont disponibles :
|
|
<itemizedlist>
|
|
<listitem>
|
|
<simpara>
|
|
<constant>PSPELL_FAST</constant> - Mode rapide (moins de
|
|
suggestions)
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
<constant>PSPELL_NORMAL</constant> - Mode normal (plus de suggestions)
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
<constant>PSPELL_BAD_SPELLERS</constant> - Mode lent (beaucoup plus de
|
|
suggestions)
|
|
</simpara>
|
|
</listitem>
|
|
<listitem>
|
|
<simpara>
|
|
<constant>PSPELL_RUN_TOGETHER</constant> - Considère que
|
|
des mots accolés forment un composé autorisé.
|
|
Ainsi, "lechat" sera un composé valide.
|
|
Cette option ne modifie que les résultats retournés par
|
|
<function>pspell_check</function>; <function>pspell_suggest</function>
|
|
retournera toujours des suggestions.
|
|
</simpara>
|
|
</listitem>
|
|
</itemizedlist>
|
|
<parameter>mode</parameter> est un masque construit à partir des constantes
|
|
listées ci-dessus. Cependant, <constant>PSPELL_FAST</constant>,
|
|
<constant>PSPELL_NORMAL</constant> et
|
|
<constant>PSPELL_BAD_SPELLERS</constant> sont mutuellement exclusives :
|
|
vous ne devez en utiliser à la fois.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Retourne une instance de <classname>PSpell\Dictionary</classname> en cas de succès,&return.falseforfailure;.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>8.1.0</entry>
|
|
<entry>
|
|
Retourne désormais une instance de <classname>PSpell\Dictionary</classname> ;
|
|
auparavant, une &resource; était retournée.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>pspell_new</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$pspell = pspell_new("en", "", "", "",
|
|
(PSPELL_FAST|PSPELL_RUN_TOGETHER));
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</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
|
|
-->
|