The spanish
option is not passed to the class, to begin with.
I don't think you really need to have class options for this, however. Here is zunbeltz.cls
:
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{zunbeltz}[2012/10/22 v0.1]
\providecommand*{\conclusionsname}{Final conclusions}
\AtBeginDocument{
\@ifpackagewith{babel}{spanish}{%
\addto\captionsspanish{\renewcommand*\conclusionsname{Conclusiones finales}}%
}{}
\@ifpackagewith{babel}{english}{%
\addto\captionsenglish{\renewcommand*\conclusionsname{Final conclusions}}%
}{}
}
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{report}}
\ProcessOptions\relax
\LoadClass{report}
and here the test document zunbeltz.tex
:
\documentclass{zunbeltz}
\usepackage[english,spanish]{babel}
\begin{document}
\conclusionsname
\selectlanguage{english}
\conclusionsname
\end{document}
You'll get
Conclusiones finales
Final conclusions
You can use the package babelbib
, which has support for Afrikaans, Bahasa, Catalan, Croatian, Czech, Danish, Dutch, English, Esperanto, Finnish, French,
Galician, German, Greek, Italian, Norwegian, Portuguese, Romanian, Russian, Serbian, Spanish, and Swedish. It provides translated versions of plain, alpha, unsrt and abbrv. With the option fixlanguage
it assumes the language provided to babel
is desired for the bibliography.
MWE (note that the filecontents
part is not necessary, it's just to create a .bib
file on the fly):
\begin{filecontents}{\jobname.bib}
@inbook{mychapter,
author = {Jan Jansen},
title = {Interessante Verhandeling},
chapter = {3},
publisher = {ABC Boeken},
year = {2018}
}
\end{filecontents}
\documentclass{article}
\usepackage[dutch]{babel}
\usepackage[fixlanguage]{babelbib}
\begin{document}
Zie \cite{mychapter}.
\bibliographystyle{babunsrt}
\bibliography{\jobname} % replace \jobname with the name of your bib file
\end{document}
Result:
Best Answer
Copy the relevant parts of the class file into your preamble and edit as necessary. Note that you need
\makeatletter
to enable the use of the@
character.