downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/function.pspell-config-create.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/ref.pspell.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'function.pspell-config-create.php',
   
1 => 'pspell_config_create',
  ),
 
'up' =>
  array (
   
0 => 'ref.pspell.php',
   
1 => 'Pspell Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.pspell-clear-session.php',
   
1 => 'pspell_clear_session',
  ),
 
'next' =>
  array (
   
0 => 'function.pspell-config-data-dir.php',
   
1 => 'pspell_config_data_dir',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.pspell-config-create" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">pspell_config_create</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.2, PHP 5)</p><p class="refpurpose"><span class="refname">pspell_config_create</span> &mdash; <span class="dc-title">Create a config used to open a dictionary</span></p>

 </div>
 
 <a name="function.pspell-config-create.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">int</span> <span class="methodname"><b>pspell_config_create</b></span>
    ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$language</tt></span>
   [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$spelling</tt></span>
   [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$jargon</tt></span>
   [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$encoding</tt></span>
  ]]] )</div>

  <p class="para rdfs-comment">
   Create a config used to open a dictionary.
  </p>
  <p class="para">
   <b>pspell_config_create()</b> has a very similar syntax to
   <a href="function.pspell-new.php" class="function">pspell_new()</a>. In fact, using
   <b>pspell_config_create()</b> immediately followed by
   <a href="function.pspell-new-config.php" class="function">pspell_new_config()</a> will produce the exact same result.
   However, after creating a new config, you can also use
   <b>pspell_config_*()</b> functions before calling
   <a href="function.pspell-new-config.php" class="function">pspell_new_config()</a> to take advantage of some
   advanced functionality.
  </p>
  <p class="para">
   For more information and examples, check out inline manual pspell
   website:<a href="http://aspell.net/" class="link external">&raquo; http://aspell.net/</a>.
  </p>
 </div>


 <a name="function.pspell-config-create.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">language</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The language parameter is the language code which consists of the
       two letter ISO 639 language code and an optional two letter ISO
       3166 country code after a dash or underscore.
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">spelling</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The spelling parameter is the requested spelling for languages
       with more than one spelling such as English. Known values are
       &#039;american&#039;, &#039;british&#039;, and &#039;canadian&#039;.
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">jargon</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The jargon parameter contains extra information to distinguish
       two different words lists that have the same language and
       spelling parameters.
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">encoding</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The encoding parameter is the encoding that words are expected to
       be in.  Valid values are &#039;utf-8&#039;, &#039;iso8859-*&#039;, &#039;koi8-r&#039;,
       &#039;viscii&#039;, &#039;cp1252&#039;, &#039;machine unsigned 16&#039;, &#039;machine unsigned
       32&#039;. This parameter is largely untested, so be careful when
       using.
      </p>
     </dd>

   
   </dl>
<p>
  </p>
 </div>


 <a name="function.pspell-config-create.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Retuns a pspell config identifier, or <b><tt class="constant">FALSE</tt></b> on error.
  </p>
 </div>



 <a name="function.pspell-config-create.examples"></a><div class="refsect1 examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   </p><div class="example">
    <p><b>Example #1 <b>pspell_config_create()</b></b></p>
    <div class="example-contents programlisting">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$pspell_config&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">pspell_config_create</span><span style="color: #007700">(</span><span style="color: #DD0000">"en"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">pspell_config_personal</span><span style="color: #007700">(</span><span style="color: #0000BB">$pspell_config</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"/var/dictionaries/custom.pws"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">pspell_config_repl</span><span style="color: #007700">(</span><span style="color: #0000BB">$pspell_config</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"/var/dictionaries/custom.repl"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$pspell_link&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">pspell_new_personal</span><span style="color: #007700">(</span><span style="color: #0000BB">$pspell_config</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"en"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div><p>
  </p>
 </div>

</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites