# Change caption of figure for references

I changed the caption of my figures running the following command (I'm using the babel package):

\addto\captionsngerman{\renewcommand{\figurename}{Abb.}}


If I use \autoref{\$LABEL} to reference to the figure, however, it still shows the original figure caption, instead of "Abb. X". Do I have to renew the command for refname as well? If so, would that change anything, if I now use \ref on something else besides my figures?

Here the MWE:

\documentclass[a4paper]{IEEEtran}

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

\begin{document}

\autoref{fig:foobar}

\begin{figure}[htb]
\caption{BarFooCamp}
\label{fig:foobar}
\end{figure}

\end{document}

-
Are you referring to the \autoref macro of the hyperref package? If so, you may want to issue the command \renewcommand\figureautorefname{Abb.}. – Mico Jan 12 '13 at 17:10
I'm assuming that it uses the \autoref of hyperref, but inserting your code, doesn't seem to solve the problem. – cherrung Jan 12 '13 at 17:14
Thanks for providing this clarification. Please post an MWE (minimum working example) that shows what you've done so far in terms of trying to get the cross-reference to a figure environment be a associated with the Abb. prefix. – Mico Jan 12 '13 at 17:22
@Mico Just added a MWE, Gonzalo's answer, however, fixed the problem. – cherrung Jan 12 '13 at 17:30

Add the redefinition to \extrasngerman:

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{hyperref}