| 1 | <?php |
| 2 | /** |
| 3 | * lang_setup.mod |
| 4 | * --------------- |
| 5 | * Squirrelspell module |
| 6 | * |
| 7 | * Copyright (c) 1999-2004 The SquirrelMail development team |
| 8 | * Licensed under the GNU GPL. For full terms see the file COPYING. |
| 9 | * |
| 10 | * This module displays available dictionaries to the user and lets |
| 11 | * him/her choose which ones s/he wants to check messages with. |
| 12 | * |
| 13 | * @author Konstantin Riabitsev <icon@duke.edu> |
| 14 | * @version $Id$ |
| 15 | * @package plugins |
| 16 | * @subpackage squirrelspell |
| 17 | */ |
| 18 | |
| 19 | global $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 | . '<blockquote><p>'; |
| 27 | /** |
| 28 | * Present a nice listing. |
| 29 | */ |
| 30 | $langs = sqspell_getSettings(null); |
| 31 | $add = '<p>' |
| 32 | . _("Make this dictionary my default selection:") |
| 33 | . " <select name=\"lang_default\">\n"; |
| 34 | while (list($avail_lang, $junk) = each($SQSPELL_APP)){ |
| 35 | $msg .= "<input type=\"checkbox\" name=\"use_langs[]\" " |
| 36 | . "value=\"$avail_lang\""; |
| 37 | if (in_array($avail_lang, $langs)) { |
| 38 | $msg .= ' checked="checked"'; |
| 39 | } |
| 40 | $msg .= ' /> ' . _($avail_lang) . "<br />\n"; |
| 41 | $add .= "<option"; |
| 42 | if ($avail_lang==$langs[0]) { |
| 43 | $add .= ' selected="selected"'; |
| 44 | } |
| 45 | $add .= " value=\"$avail_lang\" >" . _($avail_lang) . "</option>\n"; |
| 46 | } |
| 47 | $msg .= "</p>\n" . $add . "</select>\n"; |
| 48 | $msg .= "</p></blockquote><p><input type=\"submit\" value=\" " |
| 49 | . _("Make these changes") . " \" /></p>"; |
| 50 | sqspell_makePage(_("Add International Dictionaries"), null, $msg); |
| 51 | |
| 52 | /** |
| 53 | * For Emacs weenies: |
| 54 | * Local variables: |
| 55 | * mode: php |
| 56 | * End: |
| 57 | * vim: syntax=php |
| 58 | */ |
| 59 | |
| 60 | ?> |