Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Adding a new word to the en-US dictionary

Occasionally bugs are filed pointing out situations where perfectly legitimate words are missing from the English spell check dictionary in Firefox. This article describes the process for adding a word to the dictionary.

The process is pretty straight-forward:

  1. Get a clone of mozilla-central, if you don't already have one, and make sure you can build it successfully.
  2. Get into the dictionary sources directory using this command: cd extensions/spellcheck/locales/en-US/hunspell/dictionary-sources
  3. There's a special script used for editing dictionaries. The script only works if you have the environment variable EDITOR set to the executable of an editor program; if you don't have it set, you can do EDITOR=vim sh edit-dictionary to edit using vim (or you can substitute some other editor), or you can just do sh edit-dictionary if you have an EDITOR already specified.
  4. Add and remove words in the dictionary file, then quit the editor.
  5. sh merge-dictionaries to process the dictionary changes you've made.
  6. Move the revised dictionary file into position: mv en-US.dic ..
  7. Build Firefox and test your updated dictionary. Once you're satisfied, create a patch as usual, attach it to a bug, and request review.

Document Tags and Contributors

 Contributors to this page: fscholz, Sheppy, Ehsan
 Last updated by: fscholz,