[Tex/LaTex] Lyx :- Package babel Error: You haven’t specified a language option

babellanguageslyx

I get the following error in Lyx when I try to generate the pdf file.

Package babel Error: You haven't specified a language option

I have tried using the information in similar questions for TeX but it doesn't work in LyX.
For example, I tried changing the Lyx preamble by including

\usepackage[english]{babel} 

but I still get the same error.
What is the right solution to this problem in LyX?

Minimal working example is the following standard text in a LyX file with class article.

Best Answer

I just ran into the same problem with a German document. Here is what fixed the problem without any workarounds in Ubuntu; You need to adjust this to your TeX/OS combination.

sudo apt install texlive-lang-german

Also note that the described PDF Properties workaround did not work in my case. In general, I would always first look for ways to fix the actual problem, rather than using workarounds that strip my software of its features.

Edit: On Fedora this helped: sudo dnf install texlive-babel-german

Related Question