# How can I made siunitx not ignore more localisation?

It seem's that I'm doing something wrong for localizing siunitx. What could it please be?

Here is the code:

\documentclass[11pt,a4paper,german]{article}
\usepackage[ngerman]{babel}
\usepackage{fontspec}
\usepackage{siunitx} %Einheiten
\selectlanguage{german}
\sisetup{
locale = DE ,
per-mode = symbol, %nichts ist ^-1 symbol
}
%\selectlanguage{german} % oder lokal umstellen

\begin{document}
Dieser Bereich geht von \SIrange{0}{100}{\joule}

Dieser Bereich geht von \SIrange{0}{100}{\joule}\selectlanguage{german}
\end{document}


And in the attached picture there is the output using lualatex. The to should be a bis or a symbol like .

Thank you very much.

• \documentclass[...,ngerman]{article} and no \selectlanguage should work with babel Feb 6, 2017 at 15:28
• german is no valid babel language IIRC Feb 6, 2017 at 15:31
• Thanks that was it. Using ngerman it works.
– TimK
Feb 6, 2017 at 15:39

Thanks to @clemens I used german with babel and that doesn't work. Therefore using just ngerman (new german, because of a change in spell and grammar checking) localisation works now.

\documentclass[11pt,a4paper,ngerman]{article}
\usepackage[ngerman]{babel}
\usepackage{fontspec}
\usepackage{siunitx} %Einheiten
\sisetup{
locale = DE ,
per-mode = symbol, %nichts ist ^-1 symbol
}
%\selectlanguage{german} % oder lokal umstellen

\begin{document}
Dieser Bereich geht von \SIrange{0}{100}{\joule}

Dieser Bereich geht von \SIrange{0}{100}{\joule}
\end{document}


Localisation is probably a little misleading here. Siunitx localisation only covers exponent-product, inter-unit-product, output-decimal-marker.

You will have to set range-phrase manually.

• Well, it does work. :)
– TimK
Feb 6, 2017 at 15:43
• That is not related to locale option, that is because it looks for the translator package and have it translate bis and in this case german is not a supported language. You can easily have a german doc with a UK locale option. Feb 6, 2017 at 15:49
• OK, thank you very much for this clarification! It makes absolutely sense. When the to instead of the bis appeared, I tried the wrong way.
– TimK
Feb 6, 2017 at 16:07