Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am translating a calendar package (mcal.sty) from Portuguese into Indonesian, here.

\documentclass[border=4.9mm, bahasa, multi={tikzpicture}]{standalone}
\title{2014}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage[bahasa]{babel}
\usepackage{translator}
\deftranslation[to=bahasa]{Enero}{Januari}
\deftranslation[to=bahasa]{Febrero}{Februari}
\deftranslation[to=bahasa]{Marzo}{Maret}
\deftranslation[to=bahasa]{Abril}{April}
\deftranslation[to=bahasa]{Mayo}{Mei}
\deftranslation[to=bahasa]{Junio}{Juni}
\deftranslation[to=bahasa]{Julio}{Juli}
\deftranslation[to=bahasa]{Agosto}{Agustus}
\deftranslation[to=bahasa]{Septiembre}{September}
\deftranslation[to=bahasa]{Octubre}{Oktober}
\deftranslation[to=bahasa]{Noviembre}{November}
\deftranslation[to=bahasa]{Diciembre}{Desember}

\deftranslation[to=bahasa]{Lunes}{Senin}
\deftranslation[to=bahasa]{Martes}{Selasa}
\deftranslation[to=bahasa]{Miércoles}{Rabu}
\deftranslation[to=bahasa]{Jueves}{Kamis}
\deftranslation[to=bahasa]{Viernes}{Jumat}
\deftranslation[to=bahasa]{Sábado}{Sabtu}
\deftranslation[to=bahasa]{Domingo}{Minggu}
\PassOptionsToPackage{bahasa}{translator}

\usepackage{mcal}

\begin{document}
\estilodetexto% To set up \sffamily, \bfseries…
\thisyear{2014}% The year the calendar is about.
\colordelosfestivos{red}% The color of holidays.
\remaincolor{white}% The color under the top rectangle (where the title and the previous and next calendar are)
\resubcolor{white}% The color under the names of the week
\mooncounter=2% To set the first moon of the year (0,1,2,3)
\enero[7,14,21,28]{7}% The months …
\febrero[7,14,21,28]{1,2,3,7,9,25}
\marzo[7,14,21,28]{1,2,3,7,9,25}
\abril[7,14,21,28]{1,2,3,7,9,25}
\mayo[7,14,21,28]{1,2,3,7,9,25}
\junio[7,14,21,28]{1,2,3,7,9,25}
\julio[7,14,21,28]{1,2,3,7,9,25}
\agosto[7,14,21,28]{1,2,3,7,9,25}
\septiembre[7,14,21,28]{1,2,3,7,9,25}
\octubre[7,14,21,28]{1,2,3,7,9,25}
\noviembre[7,14,21,28]{1,2,3,7,9,25}
\diciembre[4,12,19,27]{6,8,25,31}

\end{document}

What is wrong? Please show me the correct codes and results.

share|improve this question
    
What does it produce when compiled? –  In PSTricks we trust Dec 30 '13 at 8:52
    
It is in Portuguese. –  kalakay Dec 30 '13 at 9:15
    
Why does it produce an output in Portuguese rather than errors? –  In PSTricks we trust Dec 30 '13 at 9:23
2  
If mcal is the code from Making a Calendar for TUG then as far as I can see the month names are hard-coded. You don't need the translator package but change the month names in your mcal.sty directly (see the lines after \def\Month{%) –  cgnieder Dec 30 '13 at 12:35
    
@cgnieder: Thank you, now this problem has been solved! –  kalakay Dec 30 '13 at 14:35

1 Answer 1

up vote 3 down vote accepted

If mcal is the code from Making a Calendar for TUG then as far as I can see the month names are hard-coded. You don't need the translator package but change the month names in your mcal.sty directly, see the lines after \def\Month{%:

\def\Month{%
\ifnum\monthcounter=1
    Enero\else
    \ifnum\monthcounter=2 
        Febrero\else
        \ifnum\monthcounter=3 
            Marzo\else
            \ifnum\monthcounter=4 
                Abril\else
                \ifnum\monthcounter=5 
                    Mayo\else
                    \ifnum\monthcounter=6 
                        Junio\else
                        \ifnum\monthcounter=7 
                            Julio\else
                            \ifnum\monthcounter=8 
                                Agosto\else
                                \ifnum\monthcounter=9 
                                    Septiembre\else
                                    \ifnum\monthcounter=10 
                                        Octubre\else
                                        \ifnum\monthcounter=11 
                                            Noviembre\else
                                            \ifnum\monthcounter=12 
                                                Diciembre%
                                            \fi
                                        \fi
                                    \fi
                                \fi
                            \fi
                        \fi
                    \fi
                \fi
            \fi
        \fi
    \fi
\fi
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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