[Tex/LaTex] How to translate tikz calendar names

babelcalendartikz-pgf

TikZ-calendar uses English names like Monday, Mon, Tuesday, January, February etc. How to I automatically translate them to – say – German?

Looking at the pgfcalendar.code.tex file I see all those names wrapped in a \translate command. I assume that this is somehow related to the babel package?

I include babel and tikz like this:

\documentclass{scrartcl}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}

\usepackage[ngerman]{babel}
% [..]
\usepackage{tikz}
\usepackage{pgfcalendar}
\usetikzlibrary{calendar}
% [..]

Should that be enough such that babel automatically picks up and translates all the TikZ-calendar names?

Perhaps there are missing some babel/TikZ language files? Is there is something to lookout for?

I am using the texlive-* packages under Fedora 19 – and I have installed some german language packages like texlive-babel-german and texlive-collection-langgerman – and currently the calendar names are not translated.

Best Answer

The \translate command is from the translator package which comes (I think) with the beamer class. In order to get translations you must load babel first, followed by the translator package and before the calendar library:

\documentclass{standalone}

\usepackage[german]{babel}
\usepackage[german]{translator}

\usepackage{tikz}

\usetikzlibrary{calendar}

\begin{document}

\sffamily\scriptsize
\tikz
  \calendar [dates=2000-01-01 to 2000-12-31,
    month list,month label left,month yshift=1.25em]
    if (Sunday) [black!50];

\end{document}

(the picture shown here is only part of the resulting pdf)

enter image description here