Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I spell check for multiple languages in emacs?
    text
    copied!<p>I write mostly my documentation in HTML using <em>emacs</em> as my main editor. Emacs let you interactively spell-check the current buffer with the command <code>ispell-buffer</code>.</p> <p>Since I switch between a number of languages, I have an HTML comment at the end of the file specifying the main dictionary and personal dictionary for that file, E.g. for Norwegian (norsk) I use the following pair of dictionaries:</p> <pre><code>&lt;!-- Local IspellDict: norsk --&gt; &lt;!-- Local IspellPersDict: ~/.aspell/personal.dict --&gt; </code></pre> <p>This works great.</p> <p>However, sometimes I have a paragraph in another language (e.g. English) embedded in an otherwise Norwegian document. Example:</p> <pre><code>&lt;p xml:lang="en"&gt;This paragraph is in English.&lt;/p&gt; </code></pre> <p>The spell-checker naturally flag <em>all</em> the words in such a paragraph as misspellings (since the dictionary only contain Norwegian words).</p> <p>To avoid this, I've tried to add a "british" dictionary to the document, like this:</p> <pre><code>&lt;!-- Local IspellDict: british --&gt; &lt;!-- Local IspellDict: norsk --&gt; &lt;!-- Local IspellPersDict: ~/.aspell/personal.dict --&gt; </code></pre> <p>Unfortunately, this does not work. The "british" dictionary is simply ignored.</p> <p>My prefered solution would to load an additional dictionary and use this, toghether with the primary dictionary, for spell-checking. Is this possible?</p> <p>However, I am also interested in a solution that let me mark paragraphs for <em>not</em> being spell checked. It is not ideal, but it would stop valid English words from being flagged as misspellings.</p> <p>PS: I have also looked at the answer to this question: <a href="https://stackoverflow.com/questions/5873601/multilingual-spell-checking-with-language-detection">Multilingual spell checking with language detection</a>, but it is much broader and does not address the specific use <em>emacs ispell</em> for doing the spell-check.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload