Skip to content

Instantly share code, notes, and snippets.

@AysadKozanoglu
Created September 15, 2021 09:20
Show Gist options
  • Select an option

  • Save AysadKozanoglu/7984c731d4cd68fa6a891c6b472e596c to your computer and use it in GitHub Desktop.

Select an option

Save AysadKozanoglu/7984c731d4cd68fa6a891c6b472e596c to your computer and use it in GitHub Desktop.
roundcube spellcheck with php-pspell moudle and aspell-de aspell-en dictonary

check your php extentions for spell extension existing

php -m | grep spell

info: you have to see pspell in the output, if not than install the php extension (see notice below)

config/config.inc.php

i use pspell for spellcheck "backend"

$config['enable_spellcheck'] = true;

// Set the spell checking engine. Possible values:
// - 'googie'  - the default (also used for connecting to Nox Spell Server, see 'spellcheck_uri' setting)
// - 'pspell'  - requires the PHP Pspell module and aspell installed
// - 'enchant' - requires the PHP Enchant module
// - 'atd'     - install your own After the Deadline server or check with the people at http://www.afterthedeadline.com before using their API
// Since Google shut down their public spell checking service, the default settings
// connect to http://spell.roundcube.net which is a hosted service provided by Roundcube.
// You can connect to any other googie-compliant service by setting 'spellcheck_uri' accordingly.

$config['spellcheck_engine'] = 'pspell';

// 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

$rcmail_config['spellcheck_languages'] = array('en'=>'English', 'de'=>'Deutsch');

Notice

install php pspell extension

apt update
apt install aspell-en aspell-de php7-pspell -y
systemctl restart php7-fpm.service

now spellcheck would be able on roundecube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment