I wrote a text file in Portuguese. I have changed my dictionary to portugues. I tried to spell-check buffer and I get the following error message:

Starting new Ispell process aspell with portugues dictionary...
ispell-init-process: Error: Expected language "pt_PT" but got "en".

How did you change the dictionary to Portuguese ? You'd need something like this :

(setq ispell-program-name "/usr/bin/hunspell") (setq ispell-local-dictionary "pt_BR") (flyspell-mode 1)

And also install the Portuguese dictionary for hunspell.

This is assuming Linux, Brazilian Portuguese, and hunspell as your preferred program. If anything is different, you'd have to chamber that or provide details here.

  • Thank you. I forgot I had solved this problem before with this code in init.el: ;; Portuguese dictionary (with-eval-after-load "ispell" (setq ispell-program-name "hunspell") (setq ispell-dictionary "en_GB,en_US,pt_PT") ;; ispell-set-spellchecker-params has to be called ;; before ispell-hunspell-add-multi-dic will work (ispell-set-spellchecker-params) (ispell-hunspell-add-multi-dic "en_GB,en_US,pt_PT"))
    – sbac
    Aug 14 '18 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.