lang_setup.mod 1.7 KB

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