Happy New Year
[squirrelmail.git] / plugins / squirrelspell / sqspell_config.php
CommitLineData
849bdf42 1<?php
4b4abf93 2
d112ed5a 3/**
4 * sqspell_config.php -- SquirrelSpell Configuration file.
5 *
8ed19238 6 * @copyright 1999-2019 The SquirrelMail Project Team
4b4abf93 7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
7996c920 8 * @version $Id$
ea5f4b8e 9 * @package plugins
10 * @subpackage squirrelspell
d112ed5a 11 */
849bdf42 12
7996c920 13/** vars needed for getHashedFile() */
14global $data_dir;
b587ac51 15sqgetGlobalVar('username', $username, SQ_SESSION);
849bdf42 16
d112ed5a 17/**
7996c920 18 * List of configured dictionaries
19 *
20 * This feature was added/changed in 0.3. Use this array to set up
21 * which dictionaries are available to users. If you only have
22 * English spellchecker on your system, then let this line be:
23 *<pre>
24 * $SQSPELL_APP = array('English' => 'ispell -a');
25 * or
26 * $SQSPELL_APP = array('English' => '/usr/local/bin/aspell -a');
27 *</pre>
28 * Sometimes you have to specify full path for PHP to find it.
202bcbcc 29 *
a36fdd68 30 * You can use Aspell or Ispell spellcheckers, the command line is the
31 * same. Aspell might provide better spellchecking for Western languages.
7996c920 32 *
33 * If you want to have more than one dictionary available to users,
34 * configure the array to look something like this:
35 *<pre>
36 * $SQSPELL_APP = array('English' => 'aspell -a',
37 * 'Russian' => 'ispell -d russian -a',
38 * ...
39 * 'Swahili' => 'ispell -d swahili -a'
40 * );
41 *</pre>
42 * WARNINGS:
43 * <ul>
44 * <li>Watch the commas, making sure there isn't one after your last
45 * dictionary declaration. Also, make sure all these dictionaries
46 * are available on your system before you specify them here.</li>
47 * <li>Whatever your setting is, don't omit the "-a" flag.</li>
48 * <li>Remember to keep same array keys during upgrades. Don't rename them.
49 * Users' dictionary settings use it.</li>
202bcbcc 50 * <li>Interface might translate array key, if used key is present in
7996c920 51 * SquirrelMail translations.</li>
52 * </ul>
53 * <pre>
d112ed5a 54 * Example:
7996c920 55 * $SQSPELL_APP = array('English' => 'ispell -a',
56 * 'Spanish' => 'ispell -d spanish -a' );
57 * </pre>
d112ed5a 58 *
7996c920 59 * @global array $SQSPELL_APP
d112ed5a 60 */
2a917bbc 61$SQSPELL_APP = array('English' => 'ispell -a',
7996c920 62 'Spanish' => 'ispell -d spanish -a');
63
80b24263 64/**
65 * Sample configuration for PHP pspell extension. Sets dictionary options.
66 * Each language definition can contain up to 3 comma delimited options.
67 * First option sets language, second sets spelling, third one sets jargon.
68 * See http://www.php.net/pspell-new
69 *
70 * Pspell extension is supported since 0.6 (sm 1.5.2)
71 */
72//$SQSPELL_APP = array('English' => 'en',
73// 'Spanish' => 'es');
74
75/**
76 * 0 - default, command line ispell or aspell utilities configured with SQSPELL_APP
77 * 1 - use php pspell extension. WARNING requires different SQSPELL_APP options.
78 */
79$SQSPELL_SPELLCHECKER = 0;
80
81/**
82 * Can be used to turn of detection of proc_open support in command line spellcheck
83 * module. Option is not used if $SQSPELL_SPELLCHECKER is set to 1.
84 */
85$SQSPELL_FORCE_POPEN = false;
86
7996c920 87/**
88 * Default dictionary
89 * @global string $SQSPELL_APP_DEFAULT
90 */
d112ed5a 91$SQSPELL_APP_DEFAULT = 'English';
7996c920 92
93/**
94 * File that stores user's dictionary
95 *
96 * $SQSPELL_WORDS_FILE is a location and mask of a user dictionary file.
97 * The default setting should be OK for most everyone.
202bcbcc 98 *
7996c920 99 * This setting is used only when SquirrelSpell is upgraded from
100 * older setup. Since SquirrelMail 1.5.1 SquirrelSpell stores all settings in
101 * same place that stores other SquirrelMail user preferences.
102 * @global string $SQSPELL_WORDS_FILE
103 * @deprecated setting is still needed in order to handle upgrades
104 */
91e0dccc 105$SQSPELL_WORDS_FILE =
d112ed5a 106 getHashedFile($username, $data_dir, "$username.words");
849bdf42 107