I've been trying to change the language of my LaTeX document by replacing \usepackage[swedish]{babel} with \usepackage[english]{babel} but I only get this message:

! Package babel Error: You haven't loaded the option swedish yet.

I've read in an other question at this forum that compiling enough would solve the problem, but that doesn't work for me. Does anyone know what I should do?

  • 12
    When you change languages you also need to delete your .aux file. Try that and recompile and the error should disappear.
    – Alan Munn
    Commented Aug 8, 2013 at 14:09
  • 2
    In addition to Alans comment, that comment you have read that it is enough to recompile, depends on how which options the editor passes to latex.
    – daleif
    Commented Aug 8, 2013 at 14:13
  • 2
    It is sufficient if you just compile once again. The inappropriate .aux has been overwritten with the first compiler run and will now be read correctly. Commented Aug 8, 2013 at 14:47
  • 1
    I'm not seeing this as a dupe: this is very focussed on a specific issue, and is a pretty common problem. In particular, it's not caused by an error in the auxiliary files.
    – Joseph Wright
    Commented Aug 8, 2013 at 15:49
  • 1
    Please, close voters, this is not really a duplicate, even though the answer is contained in the linked question. The supposed duplicate is much more general. I've linked to it in my answer, but I think we should leave this question open.
    – Alan Munn
    Commented Aug 8, 2013 at 16:40

1 Answer 1


This is a very common error with babel, and is solved by removing the .aux file whenever you change languages.

When you use babel it writes information to the .aux file that refer specifically to the language you have chosen. In your case, for example, when you select swedish as the babel language it does two things: (i) it loads a set of macros related to Swedish and (ii) it (minimally) writes the following to the .aux file.


The command \select@language{swedish} tells TeX to use the specific macros defined for Swedish.

The .aux file is used for storing information that will be reused on the next compilation. See

for some more information on this.

babel writes to the .aux file because it changes the names of things like the table of contents and list of figures according to the chosen language.

Now, when you change the language without deleting the .aux file, and compile your file, TeX reads in the .aux file and encounters the \select@language command. But since you have changed the language, the macros for Swedish haven't been loaded, and you get the error you received.

The babel package is not the only package that can sometimes require you to delete the .aux file. See the following more general question for information about them:

Newer versions of babel

If you are using an up-to-date system with babel version 3.22 or greater, you should no longer receive this error, but instead should see a warning like the following:

Package babel Warning: Unknown language `swedish'. Very likely you
(babel)                requested it in a previous run. Expect some
(babel)                wrong results in this run, which should vanish
(babel)                in the next one. Reported on input line xxx.
  • 1
    Starting from babel 3.22 unknown languages are not errors any more, they have been downgraded to warnings: lists.dante.de/pipermail/ctan-ann/2018-June/011573.html
    – moewe
    Commented Aug 18, 2018 at 19:57
  • @moewe Finally. :) I noticed that looking through the code. But there are still enough older systems around for this question to be relevant. I've updated the answer though.
    – Alan Munn
    Commented Aug 18, 2018 at 20:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .