fsf changes, meant to be rebased on upstream
[squirrelmail.git] / plugins / squirrelspell / sqspell_config.php
1 <?php
2
3 /**
4 * sqspell_config.php -- SquirrelSpell Configuration file.
5 *
6 * @copyright 1999-2021 The SquirrelMail Project Team
7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
8 * @version $Id: sqspell_config.php 14845 2020-01-07 08:09:34Z pdontthink $
9 * @package plugins
10 * @subpackage squirrelspell
11 */
12
13 /** vars needed for getHashedFile() */
14 global $data_dir;
15 sqgetGlobalVar('username', $username, SQ_SESSION);
16
17 /**
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.
29 *
30 * You can use Aspell or Ispell spellcheckers, the command line is the
31 * same. Aspell might provide better spellchecking for Western languages.
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>
50 * <li>Interface might translate array key, if used key is present in
51 * SquirrelMail translations.</li>
52 * </ul>
53 * <pre>
54 * Example:
55 * $SQSPELL_APP = array('English' => 'ispell -a',
56 * 'Spanish' => 'ispell -d spanish -a' );
57 * </pre>
58 *
59 * @global array $SQSPELL_APP
60 */
61 $SQSPELL_APP = array('English' => 'aspell -a');
62
63 /**
64 * Sample configuration for PHP pspell extension. Sets dictionary options.
65 * Each language definition can contain up to 3 comma delimited options.
66 * First option sets language, second sets spelling, third one sets jargon.
67 * See http://www.php.net/pspell-new
68 *
69 * Pspell extension is supported since 0.6 (sm 1.5.2)
70 */
71 //$SQSPELL_APP = array('English' => 'en',
72 // 'Spanish' => 'es');
73
74 /**
75 * 0 - default, command line ispell or aspell utilities configured with SQSPELL_APP
76 * 1 - use php pspell extension. WARNING requires different SQSPELL_APP options.
77 */
78 $SQSPELL_SPELLCHECKER = 0;
79
80 /**
81 * Can be used to turn of detection of proc_open support in command line spellcheck
82 * module. Option is not used if $SQSPELL_SPELLCHECKER is set to 1.
83 */
84 $SQSPELL_FORCE_POPEN = false;
85
86 /**
87 * Default dictionary
88 * @global string $SQSPELL_APP_DEFAULT
89 */
90 $SQSPELL_APP_DEFAULT = 'English';
91
92 /**
93 * File that stores user's dictionary
94 *
95 * $SQSPELL_WORDS_FILE is a location and mask of a user dictionary file.
96 * The default setting should be OK for most everyone.
97 *
98 * This setting is used only when SquirrelSpell is upgraded from
99 * older setup. Since SquirrelMail 1.5.1 SquirrelSpell stores all settings in
100 * same place that stores other SquirrelMail user preferences.
101 * @global string $SQSPELL_WORDS_FILE
102 * @deprecated setting is still needed in order to handle upgrades
103 */
104 $SQSPELL_WORDS_FILE =
105 getHashedFile($username, $data_dir, "$username.words");
106