# Babel: Add german language shorthands

I want to use the German language shorthands provided by babel with other languages; the main language of the document is German.

In following MWE the shorthands "= and /"" don't work when the English language is selected; uncommenting \useshorthands{"} doesn't have any effect.

I tried this with pdflatex of TeXLive 2014 and 2016.

(Reversing the order of the languages in the option list of babel has the desired effect, but I want to have German as the main language)

\documentclass{scrartcl}
\usepackage[english,ngerman]{babel}
%\useshorthands{"}

\begin{document}
erster/""zweiter Teil \\
Bindestrich"=Wort

\selectlanguage{english}

first/""second part\\
Hyphen"=Word

\selectlanguage{ngerman}
erster/""zweiter Teil\\
Bindestrich"=Wort
\end{document}


It works for me with

\addto\extrasenglish{\languageshorthands{ngerman}\useshorthands{"}}


Code:

\documentclass{scrartcl}
\usepackage[english,ngerman]{babel}

\begin{document}
erster/""zweiter Teil \\
Bindestrich"=Wort

\selectlanguage{english}

first/""second part\\
Hyphen"=Word

\selectlanguage{ngerman}
erster/""zweiter Teil\\
Bindestrich"=Wort
\end{document}


You can use the star version of \useshorthands to keep it active in all languages:

\documentclass{scrartcl}
\usepackage[english,ngerman]{babel}

\useshorthands*{"}

\begin{document}
erster/""zweiter Teil \\
Bindestrich"=Wort

\selectlanguage{english}

first/""second part\\
Hyphen"=Word

\selectlanguage{ngerman}
erster/""zweiter Teil\\
Bindestrich"=Wort
\end{document}


• Indeed, this works -- i missed the starred version. Shame that I can't accept two answers :-( Thanks! – FredFisch Jul 26 '16 at 15:47