Uwe Stöhr <
uwes...@web.de> wrote:
> \documentclass[ngerman,english]{report}
> \usepackage{babel}
> \usepackage{hyperref}
>
> \begin{document}
> hello
> \chapter[\selectlanguage{ngerman}Fehler]{Fehler}
> \selectlanguage{english}
> error
>
> \end{document}
>
> But if I remove the hyperref call, it compiles fine.
> I know that changing the language withing an optional argument is no good idea, the question is
> nevertheless why it fails when hyperref comes into play.
\selectlanguage breaks in the bookmarks.
\pdfstringdefDisableCommands{%
\renewcommand*{\selectlanguage}[1]{}%
}
Why don't you use \foreignlanguage?
--
Heiko Oberdiek