Multilingual Spell Checking in the Firefox Browser
This article explains how the Mozilla Firefox web browser supports simultaneous multilingual spell checking within text areas. It covers the underlying mechanics of how the browser validates text against multiple active dictionaries at once, how it generates correction suggestions, and the exact steps required to install and enable multiple languages for seamless multilingual typing.
How Simultaneous Checking Works
Firefox uses an open-source spell-checking engine called Hunspell. Historically, this implementation only allowed users to check spelling against one dictionary at a time. Starting with Firefox version 100, Mozilla updated the browser to hold multiple dictionary files in memory simultaneously.
When you type in a text area with multiple languages enabled, Firefox processes spell checking using an "OR" logic gate:
- Tokenization: As you type, Firefox breaks your text down into individual words.
- Sequential Validation: The browser checks each word against the first active dictionary. If the word is recognized, Firefox marks it as correct and moves to the next word.
- Secondary Validation: If the word is not found in the first dictionary, Firefox immediately checks it against the second enabled dictionary (and any subsequent enabled dictionaries).
- Error Flagging: A word is only underlined in red as misspelled if it fails validation across all currently enabled dictionaries.
Aggregated Spelling Suggestions
When a word fails validation in all active dictionaries, right-clicking the misspelled word triggers the suggestion engine. Firefox queries all enabled dictionaries simultaneously to find the closest phonetic and typographical matches. The context menu then displays a combined list of suggested corrections from all active languages, allowing you to select the correct word regardless of which language you were intending to use.
How to Enable Multiple Dictionaries
To use simultaneous spell checking, you must install specific language dictionaries, which are separate from the Firefox user interface "Language Packs."
- Locate a Text Area: Click inside any multi-line text box on a webpage.
- Open the Context Menu: Right-click inside the text box. (Ensure that Check Spelling is checked).
- Add Dictionaries: Hover over the Languages menu and click Add Dictionaries... This will open the Firefox Add-ons page for dictionaries and language packs.
- Install Languages: Find the languages you need and click the Add to Firefox button in the "Dictionary" column, not the "Language Pack" column.
- Activate Multiple Languages: Return to your text area, right-click, and hover over Languages. You will see your installed dictionaries listed with checkboxes next to them. Click to place a checkmark next to every language you want Firefox to check simultaneously.
Once multiple checkboxes are selected, Firefox will immediately re-evaluate the text in the box and remove red underlines from words that are valid in any of your newly activated languages. Your selections are saved automatically and will apply to all text areas across the browser until you manually uncheck them.