emacslatexispell

How to define two ispell dictionaries in Emacs for LaTeX mode?


I have a document with many quotations in a second language. How can I define this second language to Ispell? I have this in file top:

%% Local IspellDict: brasileiro

I tried this, but it didn't work:

%% Local IspellDict: brasileiro, english

Solution

  • I have a way to toggle between two languages:

    ;; You should have aspell-ru and aspell-en packages installed
    (let ((langs '("english" "russian")))
      (setq lang-ring (make-ring (length langs)))
      (dolist (elem langs) (ring-insert lang-ring elem)))
    (defun cycle-ispell-languages ()
      (interactive)
      (let ((lang (ring-ref lang-ring -1)))
        (ring-insert lang-ring lang)
        (ispell-change-dictionary lang)))
    
    (global-set-key (kbd "C-1") 'cycle-ispell-languages)