| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | ** LANG_SETUP.MOD.PHP -- Squirrelspell module |
| 5 | ** |
| 6 | ** Copyright (c) 1999-2002 The SquirrelMail development team |
| 7 | ** Licensed under the GNU GPL. For full terms see the file COPYING. |
| 8 | ** |
| 9 | ** This module displays available dictionaries to the user and lets |
| 10 | ** him/her choose which ones s/he wants to check messages with. |
| 11 | ** |
| 12 | ** $Id$ |
| 13 | **/ |
| 14 | |
| 15 | // Making sure Sqspell doesn't barf when working with E_ALL |
| 16 | global $SQSPELL_APP; |
| 17 | |
| 18 | $msg = '<p>'. |
| 19 | _("Please check any available international dictionaries which you would like to use when spellchecking:"). |
| 20 | '</p>'. |
| 21 | '<form method="post">'. |
| 22 | '<input type="hidden" name="MOD" value="lang_change">'. |
| 23 | '<blockquote><p>'; |
| 24 | $langs = sqspell_getSettings(null); |
| 25 | $add = '<p>'. |
| 26 | _("Make this dictionary my default selection:") . |
| 27 | " <select name=\"lang_default\">\n"; |
| 28 | while (list($avail_lang, $junk) = each($SQSPELL_APP)){ |
| 29 | $msg .= "<input type=\"checkbox\" name=\"use_langs[]\" value=\"$avail_lang\""; |
| 30 | if (in_array($avail_lang, $langs)) { |
| 31 | $msg .= ' checked'; |
| 32 | } |
| 33 | $msg .= '> ' . _($avail_lang) . "<br>\n"; |
| 34 | $add .= "<option"; |
| 35 | if ($avail_lang==$langs[0]) { |
| 36 | $add .= ' selected'; |
| 37 | } |
| 38 | $add .= " value=\"$avail_lang\" >" . _($avail_lang) . "</option>\n"; |
| 39 | } |
| 40 | $msg .= "</p>\n" . $add . "</select>\n"; |
| 41 | $msg .= "</p></blockquote><p><input type=\"submit\" value=\" " . _("Make these changes") . " \"></p>"; |
| 42 | sqspell_makePage(_("Add International Dictionaries"), null, $msg); |
| 43 | |
| 44 | ?> |