# spanish option for babel

I recently updated my Miktex 2.9 and when I tried to compile my files I get the following error, which I didn't have before:

package babel error: unknown option spanish. Either you misspelled it or the language definition file spanish.ldf was not found.

This is a MWE:

\documentclass[12pt]{article}
\usepackage[explicit]{titlesec}
\usepackage[usenames,dvipsnames]{pstricks}
\usepackage[spanish]{babel}
\usepackage[latin1]{inputenc}
\begin{document} Esta es una prueba. \end{document}

• Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. 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}.
– user31729
Jun 11 '14 at 6:01

The organization of babel has changed. The languages has been separated into separate distribution packages and are now independently maintained. In MiKTeX you have to install babel-spanish to get babel's spanish.

I was looking for an answer at this related or duplicate question.

For me on different Ubuntu derivates, this did the trick:

sudo apt-get install texlive-lang-spanish %in my case -german


(don't forget the install as in egreg's comment where I have this from)

sudo dnf install texlive-babel-spanish %in my case -german


Of course, you can replace spanish/german with your needed language, dutch, francais or another one.

## Edit/Update:

Apparently, as stated in this answer, these packages have become obsolete; texlive-lang-european should be installed now instead:

sudo apt-get install texlive-lang-european


Fore a more technical explanation see here