[Tex/LaTex] Changing the \autoref name for Chapter

hyperref

I'm trying to change the name the function \autoref (from the hyperref package) uses for chapters. By default it outputs "chapter X" (lower case c) but I want it to output "Chapter X" (upper case c). In my document I can successfully redefine the \chapterautorefname function to something else without generating warnings or errors, but the value I assign to it seems to be ignored. I've also tried normally defining it (which nicely gives an already defined error) and redefining \Chapterautorefname (which generated a nice, not yet defined error).

Minimal working example

\documentclass[12pt, a4paper, openany]{report}
\usepackage[english]{babel}         
\usepackage[utf8]{inputenc}         
\usepackage{hyperref}               

\renewcommand{\chapterautorefname}{Something}

% Document
\begin{document}
\chapter{One}
In \autoref{chap:two}...

\chapter{Two}
\label{chap:two}

\end{document}

Generated output:

Output

Best Answer

Package babel supports many languages, therefore you have to put the redefinition into \extrasenglish:

\documentclass[12pt, a4paper, openany]{report}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[colorlinks]{hyperref}

\addto\extrasenglish{%
  \renewcommand{\chapterautorefname}{Chapter}%
}

\begin{document}
\chapter{One}
In \autoref{chap:two}...

\chapter{Two}
\label{chap:two}
\end{document}

Result

It is also explained in the manual of hyperref.