17

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.

1

1 Answer 1

21

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 tikz package and 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

1
  • Do you know by any chance which files this depends on so that somebody could configure things to support a language for which the translations don't exist? Actually, I think tlmgr info --list beamer | grep English gives this information.
    – cfr
    Dec 21, 2013 at 23:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .