summaryrefslogtreecommitdiff
path: root/roundcubemail
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-11-19 08:30:28 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2008-11-19 08:30:28 +0000
commit3379be42f16e2b788aa6ffcc74732db3fa84cb00 (patch)
treeba426340a309157a5e111e0922c2bf4e02f7ee7a /roundcubemail
parentadad557bc065fd6d085003e768ebccb3afbb167f (diff)
- fix default spellcheck language setting (#1485570)
git-svn-id: https://svn.roundcube.net/trunk@2065 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail')
-rw-r--r--roundcubemail/program/steps/mail/compose.inc10
1 files changed, 7 insertions, 3 deletions
diff --git a/roundcubemail/program/steps/mail/compose.inc b/roundcubemail/program/steps/mail/compose.inc
index fbafc0f26..d1d913b68 100644
--- a/roundcubemail/program/steps/mail/compose.inc
+++ b/roundcubemail/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(