[Tex/LaTex] XeLaTeX Polyglossia does not load language

miktexpolyglossiaxetex

I try to use XeLaTex with localisation to another language, in my case German.
But when I compile the following minimal code

\documentclass[a4paper]{scrartcl}
\usepackage{xltxtra}
\usepackage{polyglossia}
\setdefaultlanguage{de}

\begin{document}
\begin{figure}
    \centering
    Test Test Test Test \TeX \XeTeX
    \caption{Eine Abbildung}
\end{figure}
\end{document}

I get this error message:

Package polyglossia Warning: File gloss-de.ldf does not exist!
(polyglossia)                I will nevertheless try to use hyphenation pattern
s for de. on input line 4.

Package polyglossia Warning: \setlocalhyphenmin useless for unknown language de
on input line 4.

Package polyglossia Warning: No hyphenation patterns were loaded for `De'
(polyglossia)              
I will use \language=\l@nohyphenation instead on input line 4.

Nevertheless a pdf is produced though it has the wrong localisation.
The used command is xelatex -interaction=nonstopmode polyglossia_problem.tex.

I use the MiKTeX distribution under Windows 7 64-bit.

What can I do to load the missing files? The latex pendant with babel works on my machine.

Best Answer

polyglossia is complaining because de is not the correct command, you need to issue german instead. In this case, the code will compile with 0 errors.

enter image description here

Some notes:

  1. the \ after \TeX is there to preserve the space that comes afterwards.
  2. the german language has some options for the polyglossia package. For example, spelling can be

"new (= 1996) or old (= 1901): indicates whether hyphenation patterns for traditional (1901) or reformed (1996) orthography should be used."

You can check the Section 6.8 of the Manual for more options.

And here's the code

\documentclass[a4paper]{scrartcl}
\usepackage{xltxtra}
\usepackage{polyglossia}
\setdefaultlanguage{german}

\begin{document}
\begin{figure}
    \centering
    Test Test Test Test \TeX\ \XeTeX
    \caption{Eine Abbildung}
\end{figure}
\end{document}