3

In this example month names are printed in English even the babel package is loaded with French language.

\documentclass{article}
%\usepackage[pdftex,active,tightpage]{preview}
%\setlength\PreviewBorder{2mm}
\usepackage[frenchb]{babel}
\usepackage{pgfgantt}
\usepackage{lscape}


 \begin{document}
     \begin{landscape}
         \begin{tikzpicture} % optional
            \begin{ganttchart}[x unit=2.5mm, time slot format=isodate]{2014-04-28}{2014-07-11}
                \gantttitlecalendar{month=name} \\
                 \ganttbar{Task 1}{2014-04-28}{2014-05-10} \\
             \end{ganttchart}
        \end{tikzpicture}
    \end{landscape}

\end{document}

Babel is not working with pgfgantt?

4

Add

\usepackage[frenchb]{translator}

before loading the pgfgantt package.

MWE:

\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage[frenchb]{babel}
\usepackage[frenchb]{translator}
\usepackage{pgfgantt}
\usepackage{lscape}

\begin{document}
  \begin{landscape}
    \begin{ganttchart}[x unit=2mm, time slot format=isodate]{2014-06-20}{2014-09-11}
      \gantttitlecalendar{month=name} \\
      \ganttbar{Task 1}{2014-07-28}{2014-08-10} \\
    \end{ganttchart}
  \end{landscape}
\end{document}

enter image description here

  • Thanks, they don't tell that in pgfgantt manual and searching Google didn't help me. – Hunsu Apr 27 '14 at 11:49
  • 1
    Does not work for me. Copying the MWE from the answer results in English month names. Using TeXLive 2014 and pgfgantt version 4. – gertvdijk Sep 3 '14 at 14:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.