Snippets code from my daily experience

February 3, 2009

Firefox spelling checker and multiple dictionaries

Filed under: extension,firefox,spelling — dafi @ 10:00 am

When Firefox integrated the spelling checker I didn’t immediately realized its value, but using it day after day I became “spell” addicted and now I can’t imagine my browser without this feature.

You can install all dictionaries you need, but many people uses only the dictionary for its own language.

Obviously I’m not a normal person so I use three dictionaries; Italian, English and French switching between them when necessary.

Following Murphy laws every time I start to type inside a input box I discover I’m using the wrong language and I must switch it from context menu, a very annoying practice.

Finally I’ve solved this problem writing the extension SpellBySite.

SpellBySite switches automatically to the correct dictionary looking for it on user settings.

For example user can set English dictionary for mail.google.com, Italian for twitter.com and so on.

When input boxes receive focus the dictionary is set and spell checking executed, no more needs to switching from context menu😀

Now my life is a bit easier😛

PS
SpellBySite is waiting on AMO to escape from sandbox😉

15 Comments

  1. Will you add support for switching in the one page based on multiple textarea inputs with different lang attributes? Like lang=”es-ES” as suggested at:

    http://brainstorm.ubuntu.com/idea/14655/

    Great job implementing the other half of that idea🙂

    Comment by Mardeg — February 3, 2009 @ 10:38 am

    • It sounds interesting using the lang attribute, I will add very soon

      Comment by dafi — February 3, 2009 @ 10:43 am

  2. What a fantastic idea to have a whitelist of site’s languages.

    To make the language changing automatic on 99% of sites, how about reading the headers of the sites: , even before reading the language of individual textareas. I think web are more likely to define the lanfguage of the page before they define textareas…!?

    Anyhow, thanks for a fantastic add-on!!!

    Comment by Peter Lairo — February 3, 2009 @ 11:11 am

  3. Apologies for some errors:

    add: …sites: html lang=”en-us”, even…

    add: …I think web authors are…

    Comment by Peter Lairo — February 3, 2009 @ 11:15 am

  4. Here’s another one: http://en.design-noir.de/mozilla/dictionary-switcher/
    Tries to auto-detect and allows you to save the setting for the current site.

    Comment by Dao — February 3, 2009 @ 12:33 pm

  5. Err… did you just rewrite Dictionary Switcher ?🙂 https://addons.mozilla.org/fr/firefox/addon/3414

    Comment by mat — February 3, 2009 @ 12:58 pm

  6. What about spell-checking in all installed languages and using the language with the least errors?

    Use case for this:
    I use GMail for writing emails, both in English and German. The only difference is who and what I write to. The same for some forums I visit. I don’t think you can solve this problem with looking at the HTML alone.

    Comment by Benjamin Otte — February 3, 2009 @ 2:05 pm

  7. So https://addons.mozilla.org/firefox/addon/3414 doesn’t fulfill your desires?

    Comment by Archaeopteryx — February 3, 2009 @ 2:09 pm

  8. I’m not sure but ‘Dictionary Switcher’ does work with gmail and wordpress HTML editor?

    Comment by dafi — February 3, 2009 @ 2:55 pm

  9. Had to type a German mail on yahoo.com yesterday, SpellBySite kept resetting the language to English (I have a “fallback” rule at the bottom that says “everything not mentioned is English”). Not sure whether this is because of site specifics (HTML editor) or whether my frequent switches to other applications were the cause – but apparently onEnableSpell() can be called more than once for the same text field. Maybe set an expando property on that text field to make sure you don’t change the language more than once?

    Comment by Wladimir Palant — February 4, 2009 @ 7:26 am

    • Hi Wladimir,

      I’m investigating the cause of bug maybe related to onFocus() listener (called more times).
      I hope to release a new version very soon, the next release will also contain other minor fixes reported on AMO comments😉
      The code handling the yahoo HTML editor should be bug free (I repeat “should be”) because it is the same code used on ViewSourceWith and it ever worked

      Comment by dafi — February 4, 2009 @ 7:48 am

  10. Firefox: Panic Mode, Location Bar und Tasks in der Sidebar…

    Google Mail hat ja nun auch eine To Do-Liste an Board. Wer mag kann diese in der Sidebar des Firefox anzeigen. Dazu einfach diesen Link in die Bookmarks aufnehmen und in den Eigenschaften aktivieren, dass man dieses Lesezeichen in der Sidebar laden m…

    Trackback by Caschys Blog — February 4, 2009 @ 6:24 pm

  11. I encounter the same bug as Wladimir Palant with version 0.1.2. It doesn’t seem to be site specific – it occurs even on a page with textarea as the only element, without any scripting involved. Every time the textarea regains focus, its language is reset to the one specified by the filter list. Please set the language only once, rather than at each refocus.

    Very useful extension, thank you!

    Comment by snoring — September 23, 2009 @ 11:21 pm

  12. Also, please consider setting the language when the textarea is created, not when it is focused.

    Comment by snoring — September 26, 2009 @ 10:40 am

    • I want to rewrite entirely the code

      Comment by dafi — September 26, 2009 @ 10:42 am


RSS feed for comments on this post.

Blog at WordPress.com.

%d bloggers like this: