From 2f2f15b7aabe19e45dad9bddb7eb7f4394aa1e21 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Mon, 04 Sep 2006 08:26:30 -0400 Subject: [PATCH] Little improvements for message parsing and encoding --- program/steps/mail/compose.inc | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index f9ea876..2f650d6 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -385,13 +385,18 @@ // include GoogieSpell if (!empty($CONFIG['enable_spellcheck'])) { + $lang_set = ''; + if (!empty($CONFIG['spellcheck_languages']) && is_array($CONFIG['spellcheck_languages'])) + $lang_set = "googie.setLanguages(".array2js($CONFIG['spellcheck_languages']).");\n"; + $OUTPUT->include_script('googiespell.js'); $OUTPUT->add_script(sprintf("var googie = new GoogieSpell('\$__skin_path/images/googiespell/','%s&_action=spell&lang=');\n". "googie.lang_chck_spell = \"%s\";\n". "googie.lang_rsm_edt = \"%s\";\n". "googie.lang_close = \"%s\";\n". "googie.lang_revert = \"%s\";\n". - "googie.lang_no_error_found = \"%s\";\n". + "googie.lang_no_error_found = \"%s\";\n%s". + "googie.setCurrentLanguage('%s');\n". "googie.decorateTextarea('%s');\n". "%s.set_env('spellcheck', googie);", $GLOBALS['COMM_PATH'], @@ -400,6 +405,8 @@ rep_specialchars_output(rcube_label('close')), rep_specialchars_output(rcube_label('revertto')), rep_specialchars_output(rcube_label('nospellerrors')), + $lang_set, + substr($_SESSION['user_lang'], 0, 2), $attrib['id'], $JS_OBJECT_NAME), 'foot'); -- Gitblit v1.9.1