[Tex/LaTex] Change name of “Figure” and “References” in ACM SIG alternate

acmchangeslanguages

I want to change the words Figure and References into another language, using ACM SIG alternate template. Any ideas how I can achieve this?

\documentclass{sig-alternate}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}

\begin{document}

\section{Test}

This is a test.

\begin{figure}[hbt]
\centering
\includegraphics[width=0.48\textwidth]{test_image}
\caption{Test Figure}
\end{figure}

And here is a reference: \cite{testCite}.

\bibliographystyle{abbrv}
\bibliography{citations}

\end{document}

Best Answer

The class hardwires the names; it's easy to change this though.

\documentclass{sig-alternate}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{etoolbox}

\makeatletter
% don't use hardwired names
\def\fnum@figure{\figurename\ \thefigure}
\def\fnum@table{\tablename\ \thetable}
\patchcmd{\thebibliography}{References}{\refname}{}{}
\patchcmd{\thebibliography}{References}{\refname}{}{}
% fix a silly usage of \uppercase in \@sect
\patchcmd{\@sect}{\uppercase}{\MakeUppercase}{}{}
\patchcmd{\@sect}{\uppercase}{\MakeUppercase}{}{}
\makeatother

\begin{document}

\section{Test}

This is a test.

\begin{figure}[hbt]
\centering
\includegraphics[width=0.48\columnwidth]{example-image}
\caption{Test Figure}
\end{figure}

And here is a reference: \cite{testCite}.

%\bibliographystyle{abbrv}
%\bibliography{citations}

\begin{thebibliography}{1}
\bibitem{testCite} Something

\end{thebibliography}

\end{document}

The change has no consequence in case babel is not used. I added a mock thebibliography environment just to show the effect.

Note that you should use \columnwidth and not \textwidth for the figure.

enter image description here