19 thoughts on “Google Spell Checker

  1. Welp, I’m in no way a JavaScript expert, but from what I can tell, neither Mozilla nor IE will allow you to XMLHttpRequest a link that’s not local, unless you go through the process of getting a digital ID and signing your code… So the typical AJAX approach wouldn’t seem to work (unless I’m missing something).

    So, in order to work around this “security measure”, I wrote a PHP script that accepts the words to be spell checked and simply POSTs to Google’s SSL page (using Curl) and returns the results, just like they do… You could then use Ajax to poll your page (which is local) as normal…

    You can find my working test (including all source code) at: http://dacnomm.com/googlespell/
    I also go into slightly more detail on my blog at: http://incoherentbabble.com

  2. Sebbi, not true!

    Danish, German, English, Spanish, French, Italian, Dutch, Polish, Portuguese, Finnish and Swedish are all supported by Google’s spell check feature.

  3. Chris meller implementation is cool too…

    It shouldnt be hard to use that, as in modifing pspell to “wrap” around google spell.

    The spellchecker I have http://www.lab4games.net/zz85/blog/wordpress-plugins/live-spell-checker/ currently have a google style checking and a check as you type style (using emil’s spellchecker, port from cgi to php using pspell wrappers again ;).

    There doesnt seems to be much interest in it now but anyone wants a google check feature to it, hands up?

  4. Will there be a distinction for UK-English Vs. US-English? Spell checkers are great, but not when they can’t make the distinction between the different versions of English – then they are just semi-good.

  5. It doesn’t exist in the toolbar now, but I wouldn’t be surprised if it were added in the future. Historically, Google has released somewhat rough products at first, then gone back and added in lots of little features later. I was looking for a ‘Suggest a Feature’ link somewhere on the toolbar site, but didn’t find one. Be patient, I’m sure it’ll get added eventually.

  6. I believe the Gmail spell-checker distinguishes UK and US english by looking at your Accept-Language request header, hence how it also knows which language you are checking the spelling for. We can not use the Gmail spell checker in WordPress, since it is behind an auth wall, but this open API that the toolbar uses sounds interesting at first, but since the API is not supposed to be used by third-parties then any plugin will always just be a hack and with every little change google makes it will break all installs. Best solution in building a proper spell-checking plugin for WP without relying on pspell (which nobody seems to have installed) would be to either

    a) rely on a proper API such as what UrbanDictionary provide (Firas pointed that out). Limitations are that every user needs to get an API key and it is limited to 1000 transactions a day.
    b) use pspell on the command line. Limitations are that it wont work on windows, lots of servers with no psell or ispell installed
    c) setup an API on a server for WP blogs to use. downside is that other people will stumble on it and abuse it for other applications, no real way to only allow WP blogs to use it
    d) write a plugin that has its own dictionary, no dependancies at all etc. Downside is that dictionary files are large.

    At the moment I am leaning towards D as the ‘best’ solution. Though probably not the ‘right’ solution.

Comments are closed.