I am unable to make my class strings language dependent using babel. I have the following minimal example:
file test-babel.cls
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{test-babel}[2012/10/22 v0.1]
\DeclareOption{spanish}{%
\AtBeginDocument{%
\renewcommand*\conclusionsname{Conclusiones finales}
}
\AtEndOfClass{\main@language{spanish}}
}
\DeclareOption{english}{%
\AtBeginDocument{%
\renewcommand*\conclusionsname{Final conclussions}
}
\AtEndOfClass{\main@language{english}}
}
\newcommand\conclusionsname{dumyy}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
\ProcessOptions\relax
\LoadClass{report}
\newcommand\print{\conclusionsname}
I use this test tex file:
\documentclass{test-babel}
\usepackage[spanish]{babel}
\begin{document}
\print
\end{document}
The result of compilation is the word dummy, the default value, and not the
Spanish translation.
Can someone help me to understand how to use babel while writing a class?