# Spanish.ldf error [closed]

I just installed MiKTeX 2.9 x64 on my windows 8.1 laptop. I use Texmaker as a TeX editor.

I'm trying to compile a document with these packages:

\usepackage[utf8]{inputenc}

\usepackage[spanish]{babel}

\usepackage[spanish]{layout}


when the compiler is running, it appears the MiKTeX Package Manager's message saying that the file spanish.ldf is missing and it will install the babel-spanish package. So, I click yes, then the package is installed, but I get the following error: (and hundred more)

! Undefined control sequence.
l.117 \StartBabelCommands


on line 117 but my file only has 67 lines!.

On the other hand, if I compile the file clicking on "no" to the package manager, the file compile normally.

How can I install the babel-spanish in order to compile normally my files?

I tried to install this package from differents repositories and I still get the error.

## closed as off-topic by egreg, darthbith, user13907, Andrew Swann, Svend TveskægMay 19 '15 at 10:56

• This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. You might also want to add to your question how you're including the pdfs etc. – Aradnix Sep 4 '14 at 4:56
• l.117 \StartBabelCommands refers spanish.ldf file not to your .tex file. – Ignasi Sep 4 '14 at 6:33
• Did you run the update manager (in admin and in user mode if you have a multiuser installation)? – Ulrike Fischer Sep 4 '14 at 8:02
• I presume what you need is to install a recent version of babel. – Javier Bezos Sep 5 '14 at 14:14
• I'm voting to close this question as off-topic because it's an issue due to outdated software, solved by an update. – egreg May 19 '15 at 10:07

You should probably care about the order of the package calls... I think you can't call \usepackage{inputec} BEFORE \usepackage{babel}... LaTeX needs to "know" first which language is going to use... I hope this fix your problem...