lang_setup.mod 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. * lang_setup.mod
  4. * ---------------
  5. * Squirrelspell module
  6. *
  7. * Copyright (c) 1999-2002 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. * $Id$
  14. *
  15. * @author Konstantin Riabitsev <icon@duke.edu> ($Author$)
  16. * @version $Date$
  17. */
  18. global $SQSPELL_APP;
  19. $msg = '<p>'
  20. . _("Please check any available international dictionaries which you would like to use when spellchecking:")
  21. . '</p>'
  22. . '<form method="post">'
  23. . '<input type="hidden" name="MOD" value="lang_change">'
  24. . '<blockquote><p>';
  25. /**
  26. * Present a nice listing.
  27. */
  28. $langs = sqspell_getSettings(null);
  29. $add = '<p>'
  30. . _("Make this dictionary my default selection:")
  31. . " <select name=\"lang_default\">\n";
  32. while (list($avail_lang, $junk) = each($SQSPELL_APP)){
  33. $msg .= "<input type=\"checkbox\" name=\"use_langs[]\" "
  34. . "value=\"$avail_lang\"";
  35. if (in_array($avail_lang, $langs)) {
  36. $msg .= ' checked';
  37. }
  38. $msg .= '> ' . _($avail_lang) . "<br>\n";
  39. $add .= "<option";
  40. if ($avail_lang==$langs[0]) {
  41. $add .= ' 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. */
  55. ?>