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.


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.

Posted by Tom on June 10, 2010 at 09:29 AM CEST #

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

Posted by Michal Tatarynowicz on June 10, 2010 at 02:42 PM CEST #

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

Greetings and thx!

Posted by Sam Vloeberghs on June 11, 2010 at 02:21 AM CEST #

It would be a great improvement if we could use OpenOffice dictionaries.
As Netbeans, they are made by Sun/Oracle...

Posted by David on June 18, 2010 at 08:06 AM CEST #

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

Posted by Pooky on July 10, 2010 at 04:50 PM CEST #


Posted by ALI on August 22, 2010 at 02:20 PM CEST #

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

Posted by Daniel Dimitrov on November 15, 2010 at 03:14 AM CET #

Wish this checked php strings as well.

Posted by Sky on December 08, 2010 at 04:21 AM CET #

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

Posted by Sky on December 08, 2010 at 04:25 AM CET #

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.

Posted by kavitasyon on April 01, 2011 at 10:17 AM CEST #

We could use OpenOffice dictionaries. As Netbeans...

Posted by แอร์ on April 25, 2011 at 10:30 PM CEST #

I've used this file for use spanish dictionary http://snowball.tartarus.org/algorithms/spanish/voc.txt But netbeans apparently doesn't recognize, because the correct words appears red underlined. Can you helo me?

Posted by guest on May 07, 2011 at 01:34 PM CEST #

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?

Posted by guest on January 22, 2014 at 08:39 AM CET #

Post a Comment:
  • HTML Syntax: NOT allowed

This blogs is written by NetBeans developers who contribute to the PHP support mainly.


« February 2017