# XeLaTeX: Using \foreignlanguage results in an error [closed]

I'm trying to switch to XeTeX, because I would love to have a better integration of postscript code (and pstricks) in my PDF files. However, I did not succeed completely, one error is left and present in the MWE I have added below:

! Missing number, treated as zero.

\l@german

A number should have been here; I inserted 0'.

MWE:

\documentclass[titlepage,listof=totoc,final,fontsize=12pt]{scrbook}

\usepackage{polyglossia} % LuaLaTeX replacement for babel
\setdefaultlanguage[variant=american]{english}
\setotherlanguage[spelling=new]{german}
\usepackage{fontspec}

\begin{document}

\foreignlanguage{german}{ABC}

\end{document}


I have to include some German text in my otherwise completely English book. That's why I have used \foreignlanguage which has never been a problem with pdfLaTeX.

-

## closed as off-topic by egreg, Svend Tveskæg, Peter Jansson, barbara beeton, JesseFeb 23 '14 at 14:18

• 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.

It might be preferable to write \textgerman{ABC} instead. –  Thorsten Donig Feb 22 '14 at 15:33
Gives the same error as \foreignlanguage does. –  DL6ER Feb 22 '14 at 15:47
I don't get any errors. –  karlkoeller Feb 22 '14 at 15:50
Complete logfile: dl6er.de/german.log –  DL6ER Feb 22 '14 at 15:54
This question appears to be off-topic because it is about a problem very specific to the OP –  egreg Feb 23 '14 at 13:18

Installing TeXLive "on top" of the old one will not work. The error persists. One has to delete /usrlocal/texlive/2013/* and /usrlocal/texlive/texmf-local/* manually. After that, the error no longer occurs after performing a new installation.
However, I cannot explain what might have caused the problem in the first place, as the reinstallation was successful using the same version of install-tl.
You probably had a language.dat file in texmf-local`. –  egreg Feb 23 '14 at 13:17