List of Algorithms appears in the german language

I am trying to add the list of algorithms to my thesis but I am facing the problem that it is the only one which appears in the german languauge also I am getting Liste der Algorithmen instead of List of Algorithms. I need the german option in the document class since I am writing the abstract in german too. How can I fix it?

List of Figures and List of tables appears in the english language!!!

Code:

\documentclass[
english,
german,
11pt,
twoside,
a4paper,
BCOR8.25mm,
DIV10,
footsepline
]{scrbook}

\usepackage{graphicx}
\usepackage{listings}
\usepackage[linesnumbered,ruled,vlined]{algorithm2e}
\usepackage{babel}
\begin{document}

\selectlanguage{english}
\frontmatter

\begin{table}[h]
\centering
\scalebox{0.8}{
\begin{tabular}{ |l|l|l|l|l|l|l|l|}
\hline
behaviour\_id & mac & stop\_name & stop\_distance & speed & direction & route & created\_at \\
\hline
1 &10:X5:J0:06:B6:U8 & Arsenal  & 45 & 18 & Piccadilly & 9 & 2015-10-03 11:02:13 \\
\hline
\hline
\end{tabular}}
\caption{Arrivaletime table after injection.}
\end{table}

\bigbreak

\begin{algorithm}[H]
\SetAlgoLined
\KwData{mac}
\KwResult{Status 202.}

find $behaviour\_id$ of the last $stop\_name$ with $stop\_distance < 60$ and this mac in the behaviour table;\\
get 6 records with the same $stop\_name$ after the found $behaviour\_id$;\\
int $speedAverage$ = calculate the speed average of these records;\\
\If{$speedAverage < 6$}{
delete data for this mac from the bus plus  behaviour tables; \\            return $status = 202$;
}

\caption{Detection algorithm - Deleting.}
\label{alg: status200}
\end{algorithm}

\appendix

\listoffigures

\listoftables
\listofalgorithms
\lstlistoflistings

\end{document}

• do not load the (old) language german if you do not really need it. Without you'll get the english title. – user2478 Oct 4 '15 at 11:27
• Some KOMA-options are obsolete. – Johannes_B Oct 4 '15 at 11:42
• what hapens, if you change order of appearance language options? First "german", than "english"? Babel is sensitive to this, as far as I can remember. – Zarko Oct 4 '15 at 12:22
• @Zarko: I already tried that but doesn't change anything – patrickvogt Oct 4 '15 at 13:24

As Quick-Fix: Try to set the name manually before \begin{document} like this

\renewcommand*\listalgorithmcfname{List of Algorithms}


But maybe it is a better idea to delete the german option (aswell as the english option) from the document class and then handle every "German" things manually for the German abstract. If just one or two pages of your thesis will be German, I wouldn't add that option to the whole document class, since it will then affect the whole document (including some unknown side-effects for some packages, as you already found out).

So in my opinion you should use the language option for babel (or other packages where you need localized German descriptions/style/behaviour etc.) and not for the whole document class. If needed you can then e.g. overwrite the abstract name as "Zusammenfassung" just before the German abstract.

This way you don't have to overwrite any internals of the algorithm2e package.

\documentclass[
11pt,
twoside,
a4paper,
BCOR8.25mm,
DIV10,
footsepline
]{scrbook}

\usepackage{scrhack}
\usepackage{graphicx}
\usepackage{listings}
\usepackage[ngerman,english]{babel}

\usepackage[linesnumbered,ruled,vlined]{algorithm2e}

\begin{document}

\selectlanguage{english}
\frontmatter

\begin{table}[h]
\centering
\scalebox{0.8}{
\begin{tabular}{ |l|l|l|l|l|l|l|l|}
\hline
behaviour\_id & mac & stop\_name & stop\_distance & speed & direction & route & created\_at \\
\hline
1 &10:X5:J0:06:B6:U8 & Arsenal  & 45 & 18 & Piccadilly & 9 & 2015-10-03 11:02:13 \\
\hline
\hline
\end{tabular}}
\caption{Arrivaletime table after injection.}
\end{table}

\bigbreak

\begin{algorithm}[H]
\SetAlgoLined
\KwData{mac}
\KwResult{Status 202.}

find $behaviour\_id$ of the last $stop\_name$ with $stop\_distance < 60$ and this mac in the behaviour table;\\
get 6 records with the same $stop\_name$ after the found $behaviour\_id$;\\
int $speedAverage$ = calculate the speed average of these records;\\
\If{$speedAverage < 6$}{
delete data for this mac from the bus plus  behaviour tables; \\            return $status = 202$;
}

\caption{Detection algorithm - Deleting.}
\label{alg: status200}
\end{algorithm}

\appendix

\listoffigures

\listoftables
\listofalgorithms
\lstlistoflistings

\end{document}


Correct way of doing this is

\addto\captionsenglish{\SetAlgorithmName{Algorithm}{Algorithm}{List of Algorithms}}


since you are using babel.

\documentclass[
english,
german,
11pt,
twoside,
a4paper,
BCOR8.25mm,
DIV10,
footsepline
]{scrbook}

\usepackage{graphicx}
\usepackage{listings}
\usepackage[linesnumbered,ruled,vlined]{algorithm2e}
\usepackage{babel}
\begin{document}

\selectlanguage{english}
\frontmatter

\begin{table}[h]
\centering
\scalebox{0.8}{
\begin{tabular}{ |l|l|l|l|l|l|l|l|}
\hline
behaviour\_id & mac & stop\_name & stop\_distance & speed & direction & route & created\_at \\
\hline
1 &10:X5:J0:06:B6:U8 & Arsenal  & 45 & 18 & Piccadilly & 9 & 2015-10-03 11:02:13 \\
\hline
\hline
\end{tabular}}
\caption{Arrivaletime table after injection.}
\end{table}

\bigbreak

\begin{algorithm}[H]
\SetAlgoLined
\KwData{mac}
\KwResult{Status 202.}

find $behaviour\_id$ of the last $stop\_name$ with $stop\_distance < 60$ and this mac in the behaviour table;\\
get 6 records with the same $stop\_name$ after the found $behaviour\_id$;\\
int $speedAverage$ = calculate the speed average of these records;\\
\If{$speedAverage < 6$}{
delete data for this mac from the bus plus  behaviour tables; \\            return $status = 202$;
}

\caption{Detection algorithm - Deleting.}
\label{alg: status200}
\end{algorithm}

\appendix

\listoffigures

\listoftables
\listofalgorithms
\lstlistoflistings

\end{document}


• Yes, but the \caption still produces Algorithmus – user31729 Oct 4 '15 at 11:23
• @ChristianHupfer: I thought that was not part of the question. Now it should read in English. :) – user11232 Oct 4 '15 at 11:28
• Perhaps it wasn't meant that way. Nice solution! – user31729 Oct 4 '15 at 11:29