[Tex/LaTex] Table of contents language update

babeltable of contents

I am writing an article in dutch, so I have changed (using \renewcommand) the language of my tables, toc, figures and appendices. However, my table of contents won't update to the new language. This is the code I used:

\documentclass[10pt]{article}

\usepackage[nottoc,notlot,notlof]{tocbibind}
\usepackage[toc,page]{appendix}

\usepackage[dutch]{babel}
\usepackage{appendix}

\addto\captionsdutch{%
  \renewcommand{\appendixpagename}{Bijlagen}%
  \renewcommand{\contentsname}{Inhoudsopgave}%
  \renewcommand{\figurename}{Figuur}
  \renewcommand{\tablename}{Tabel}
}

\begin{document}
\begin{titlepage}

This is a sample document

\end{titlepage}

\tableofcontents

\newpage

\section{Title 1}

text here

\newpage
\section{Title 2}

text here

\newpage

\begin{appendices}
\section{Number one}
\label{appendix:numberone}
\newpage

\section{Number two}
\label{appendix:numbertwo}
\end{appendices}

\end{document}

The sections are ofcourse already in dutch and using the \contentsname macro, the title of the toc did change to "Inhoudsopgave". Also, In the actual appendices at the end of my document, it says "Bijlagen". So I don't understand why my toc does not update as well.

enter image description here

Best Answer

The package appendix defines and uses two new appendix name strings \appendixtocname for the table of contents and \appendixpagename for the appendix page. Just redefine these two strings and you will be good. Note that you do not have to redefine \contentsname, \figurename and tablename: they already have the definition you want.

\documentclass[10pt]{article}
\usepackage[dutch]{babel}
\usepackage[nottoc,notlot,notlof]{tocbibind}
\usepackage[toc,page]{appendix}

\addto\captionsdutch{%
  \renewcommand{\appendixtocname}{Bijlagen}%
  \renewcommand{\appendixpagename}{Bijlagen}%
}

\begin{document}
\begin{titlepage}

This is a sample document

\end{titlepage}

\tableofcontents

\newpage

\section{Title 1}

\begin{figure}
\caption{Lalala}
\end{figure}

\begin{table}
\caption{Lalala}
\end{table}

text here

\newpage
\section{Title 2}

text here

\newpage

\begin{appendices}
\section{Number one}
\label{appendix:numberone}
\newpage

\section{Number two}
\label{appendix:numbertwo}
\end{appendices}

\end{document}

TOC page of the example document showing the heading "Inhoudsopgave" and entries: 1 Title 1 2//2 Title 2 3//Bijlagen 4//A Number one 4//B Number two 5