Happy New Year
[squirrelmail.git] / plugins / squirrelspell / modules / lang_setup.mod
... / ...
CommitLineData
1<?php
2
3/**
4 * lang_setup.mod
5 *
6 * Squirrelspell module
7 *
8 * This module displays available dictionaries to the user and lets
9 * him/her choose which ones s/he wants to check messages with.
10 *
11 * @author Konstantin Riabitsev <icon at duke.edu>
12 * @copyright 1999-2018 The SquirrelMail Project Team
13 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
14 * @version $Id$
15 * @package plugins
16 * @subpackage squirrelspell
17 */
18
19global $SQSPELL_APP;
20
21$msg = '<p>'
22 . _("Please check any available international dictionaries which you would like to use when spellchecking:")
23 . '</p>'
24 . '<form method="post">'
25 . '<input type="hidden" name="MOD" value="lang_change" />'
26 . '<input type="hidden" name="smtoken" value="' . sm_generate_security_token() . '" />'
27 . '<blockquote><p>';
28/**
29 * Present a nice listing.
30 */
31$langs = sqspell_getSettings();
32$add = '<p><label for="lang_default">'
33 . _("Make this dictionary my default selection:")
34 . "</label> <select name=\"lang_default\" id=\"lang_default\">\n";
35while (list($avail_lang, $junk) = each($SQSPELL_APP)){
36 $msg .= "<input type=\"checkbox\" name=\"use_langs[]\" "
37 . "value=\"$avail_lang\" id=\"use_langs_$avail_lang\"";
38 if (in_array($avail_lang, $langs)) {
39 $msg .= ' checked="checked"';
40 }
41 $msg .= ' /> <label for="use_langs_' . $avail_lang . '">'
42 . _($avail_lang) . "</label><br />\n";
43 $add .= "<option";
44 if ($avail_lang==$langs[0]) {
45 $add .= ' selected="selected"';
46 }
47 $add .= " value=\"$avail_lang\" >" . _($avail_lang) . "</option>\n";
48}
49$msg .= "</p>\n" . $add . "</select>\n";
50$msg .= "</p></blockquote><p><input type=\"submit\" value=\" "
51 . _("Make these changes") . " \" /></p></form>";
52sqspell_makePage(_("Add International Dictionaries"), null, $msg);
53
54/**
55 * For Emacs weenies:
56 * Local variables:
57 * mode: php
58 * End:
59 * vim: syntax=php
60 */