FCKeditor is an excellent module - thank you for all the work.

A nice addition would be to allows users to configure which language the spellchecker (spellpages) should use. For example, each user would have a "Language" setting in their profile/edit page and this setting would be passed to spellpages every time it is used to run a spell check.

I'm guessing but I would think that this feature might need only a few small modifications to the existing module:

  1. An admin setting whereby the site admin can decide whether or not users should be allowed to choose their own languages for use with the spellchecker. The admin should also be asked for a default language.
  2. A setting on users' profile pages for setting their language
  3. A database table for storing this information
  4. Possibly just a single line of code in modules/fckeditor/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php to set the spellchecker to use the user's language

Comments

dan_aka_jack’s picture

Sorry, I completely forgot about the Localization features built into Drupal. Of course, we should leverage the existing localization features. So, I would propose that the "spell checker language selection feature" should work something like this:

  1. An admin setting whereby the site admin can decide whether or not users should be allowed to choose their own languages for use with the spellchecker. The admin should also be asked for a default language.
  2. (locale.module would then be used to allow the user to select their own language)
  3. A modification of modules/fckeditor/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php to set the spellchecker to use the user's language

And, of course, if we go down this route then the FCKeditor module will also have to declare that it likes to work with locales.module.

Incidentally, I've just started reading "Pro Drupal Development edition2" so whilst I'm not a very good Drupal coder yet, hopefully I will soon be able to build this functionality if no one else wants to. No promises though! And, of course, please do jump in and take a shot at building this functionality if you want to.

wwalc’s picture

Ok, my first thoughts:

Ad 1) Admin should have the ability to specify which Aspell dictionaries are installed (if there's a chance to check it automatically and provide some initial value it would be a plus)
Ad 2) We don't need the locale.module (?)
Ad 3) We need to get user settings inside of spellchecker.php so we need probably something similar to what we have in filemanager.config.php (search for bootstrap.inc and call drupal_bootstrap())

"A database table for storing this information"
There is no need for another table. Languages available in spell checker could be stored inside of a Global Profile. User settings can be saved in a similar way like they're saved today, it's just another field to save.

I've opened a ticket about better spell checking support: http://dev.fckeditor.net/ticket/2548.
This is a part of the editor that will be probably redesigned in CKEditor 3.x

dan_aka_jack’s picture

Many thanks for the reply.

Just wondering why you'd prefer not to use locale.module (which is included in core with D6) for specifying the user's language? If I may, I'd like to suggest two reasons why using locale.module might be preferable:

  • Users who set their language using locale.module would expect the FCKeditor spellchecker to be aware of which language they've set in locale.module
  • Using locale.module would allow us to keep our code as slim as possible and would prevent us from duplicating functionality which exists elsewhere

I take the point that it's generally a good idea to keep the list of module dependencies as small as possible. However, most multi-lingual sites would almost certainly be using locale.module anyway.

dan_aka_jack’s picture

I've just read your "Support multiple languages in spell checker" ticket and I think it's a great idea. Before implementing this functionality in the drupal FCKeditor module, let's wait and see if the FCKeditor developers implement the functionality in FCKeditor itself.

Jorrit’s picture

Status: Active » Postponed
Issue tags: +language detection

Postponed to a later module version.

Jorrit’s picture

Status: Postponed » Closed (won't fix)