An Oracle blog about NetBeans for PHP


Another new feature in NetBeans 6.9 is a spellchecker. You can switch on / off the checking for different files in Option dialog. 

In the dialog you can add and remove new dictionaries and also set the locale - which dictionary will be used for spell checking.  When you want to add new dictionary you have to have a file with the words. The format of the dictionary file is very simple, just every word on new line. Also you have to say to NetBeans in which encoding is the dictionary file and for which locale the file should be used.

Unfortunately today I have noticed a bug (issue #187425). When you add your dictionary, then the original disappear. There is a workaround for this, delete the folder dict from your userdir. It should be located in {userdir}/modules/dict . The bug should be fixed and should be available in the patch release for NetBeans 6.9.

The spellchecker works also for PHP files, where the HTML text is checked. If there is a word that is not in the dictionary, then is underline and tooltip says that it is Misspelled Word.

When you place a caret inside the misspelled word, then on the left side yellow bulb appears. You can click on the bulb to open the popup window with hints or you can also open the window through ALT + ENTER shortcut.

As you can see on the picture above, there are hints that suggest the possible correction or you can add new word to a dictionary. There are two possibilities, where you can add the unknown word. Project dictionary  and private dictionary. Private dictionary is your dictionary that is global - the word is known in all projects. The project dictionary is located in metadata folder in project.xml file and if you share the metadata via a VCS, then the dictionary is shared also with other people.

There was not enough time to integrate fully the spellchecker into PHP and there is a lot of space for improvements, like the spellcheker could check php comments, the locale could be per folder or file etc. I hope that there will be enough time next release to improve it.

Join the discussion

Comments ( 13 )
  • Tom Thursday, June 10, 2010

    Checking PHP comments would be great. XML and XLIFF-files (\*.xlf) would be great to check, too.

    Esp. as XLIFF is the official OASIS standard for translations.

    I bet people might want Java property files to be checked as well, as they are often used for translations, too.

    Also you may want to react on the xml:lang - attribute to determine the locale and select the correct dictionary. (One locale per file might not be enough, as translation files aka "XML language interchange files" usually have at least a source language and a target language, using two different locales.)

    Oh, well: so much room for improvements.

  • Michal Tatarynowicz Thursday, June 10, 2010

    Will I be able to select a different dictionary (or a set of dictionaries) for each project/folder/file?

  • Sam Vloeberghs Friday, June 11, 2010

    Should this also be working on Windows Netbeans? And where can I find the dutch dictionaries? :)

    Greetings and thx!

  • David Friday, June 18, 2010

    It would be a great improvement if we could use OpenOffice dictionaries.

    As Netbeans, they are made by Sun/Oracle...

  • Pooky Saturday, July 10, 2010

    It's awesome, thank you:)

    Sam Vloeberghs: Myself using Netbeans on Windows and everything works great. Danish dictionary I could find here - http://www.pspad.com/files/dic/da_dic.cab

  • ALI Sunday, August 22, 2010


  • Daniel Dimitrov Monday, November 15, 2010

    The place where one definitely needs a spell checker is ini files. Hopefully support for them will be introduced too.

  • Sky Wednesday, December 8, 2010

    Wish this checked php strings as well.

  • Sky Wednesday, December 8, 2010

    Just discovered that comment and string literals are in the 7.0 beta.

  • kavitasyon Friday, April 1, 2011

    La cavitación, la cavitación ultrasónica, o un método de atenuación regional, conocido como la atenuación de la cavitación. las ondas de sonido ultrasónico con la pérdida de peso método se conoce como nombre general dado a la cavitación sistemas operativos.

  • แอร์ Monday, April 25, 2011

    We could use OpenOffice dictionaries. As Netbeans...

  • guest Saturday, May 7, 2011
    I've used this file for use spanish dictionary
    But netbeans apparently doesn't recognize, because the correct words appears red underlined.
    Can you helo me?
  • guest Wednesday, January 22, 2014

    I have accidently added a misspelled word to the dictionary and now I want to remove it. how do I remove this word from the dictionary?

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.