diff options
author | alecpl <alec@alec.pl> | 2008-11-19 08:30:28 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2008-11-19 08:30:28 +0000 |
commit | 3e20c4b31d25a84549db59d670980da149c111d0 (patch) | |
tree | d66a07c033571014f1832adb6454114cb747bd09 /program/steps | |
parent | 5a173887269708ee3f913a869741e03b9aceeb41 (diff) |
- fix default spellcheck language setting (#1485570)
Diffstat (limited to 'program/steps')
-rw-r--r-- | program/steps/mail/compose.inc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index fbafc0f26..d1d913b68 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -426,8 +426,6 @@ function rcmail_compose_body($attrib) $body = $_SESSION['compose']['param']['_body']; } - rcube_html_editor(); - $out = $form_start ? "$form_start\n" : ''; $saveid = new html_hiddenfield(array('name' => '_draft_saveid', 'value' => $compose_mode==RCUBE_COMPOSE_DRAFT ? str_replace(array('<','>'), "", $MESSAGE->headers->messageID) : '')); @@ -445,8 +443,14 @@ function rcmail_compose_body($attrib) $out .= $textarea->show($body); $out .= $form_end ? "\n$form_end" : ''; + // include HTML editor + rcube_html_editor(); + // include GoogieSpell if (!empty($CONFIG['enable_spellcheck'])) { + + $lang = strtolower(substr($_SESSION['language'], 0, 2)); + $spellcheck_langs = (array)$RCMAIL->config->get('spellcheck_languages', array('da'=>'Dansk', 'de'=>'Deutsch', 'en' => 'English', 'es'=>'Español', 'fr'=>'Français', 'it'=>'Italiano', 'nl'=>'Nederlands', 'pl'=>'Polski', 'pt'=>'Português', 'fi'=>'Suomi', 'sv'=>'Svenska')); if (!$spellcheck_langs[$lang]) $lang = 'en'; @@ -454,7 +458,7 @@ function rcmail_compose_body($attrib) $editor_lang_set = array(); foreach ($spellcheck_langs as $key => $name) { $editor_lang_set[] = ($key == $lang ? '+' : '') . JQ($name).'='.JQ($key); - } + } $OUTPUT->include_script('googiespell.js'); $OUTPUT->add_script(sprintf( |