Permalink
Browse files

Applied patch for pspell language configuration (#1485822)

  • Loading branch information...
1 parent b20bca7 commit 01a8c54f76dcbbf4da4be7471dbe04ba7401bec8 @thomascube thomascube committed May 1, 2009
Showing with 6 additions and 5 deletions.
  1. +1 −2 config/main.inc.php.dist
  2. +5 −3 installer/rcube_install.php
View
@@ -219,8 +219,7 @@ $rcmail_config['spellcheck_uri'] = '';
// These languages can be selected for spell checking.
// Configure as a PHP style hash array: array('en'=>'English', 'de'=>'Deutsch');
-// Leave empty for default set of Google spell check languages, should be defined
-// when using local Pspell extension
+// Leave empty for default set of available language.
$rcmail_config['spellcheck_languages'] = NULL;
// path to a text file which will be added to each sent message
@@ -244,9 +244,11 @@ function check_config()
$out['dependencies'][] = array('prop' => 'spellcheck_engine',
'explain' => 'This requires the <tt>pspell</tt> extension which could not be loaded.');
}
- if (empty($this->config['spellcheck_languages'])) {
- $out['dependencies'][] = array('prop' => 'spellcheck_languages',
- 'explain' => 'You should specify the list of languages supported by your local pspell installation.');
+ if (!empty($this->config['spellcheck_languages'])) {
+ foreach ($this->config['spellcheck_languages'] as $lang => $descr)
+ if (!pspell_new($lang))
+ $out['dependencies'][] = array('prop' => 'spellcheck_languages',
+ 'explain' => "You are missing pspell support for language $lang ($descr)");
}
}

0 comments on commit 01a8c54

Please sign in to comment.