# \renewcommand\tablename{name} does not work

I am completely noobie in LaTeX. I need to change table name in all captions. But when I write \renewcommand\tablename{newname} at the beginning of document, it doesn't do anything. It's still "Table" My code looks like this:

...
\renewcommand\tablename{new}
...
\begin{table}[b]
\centering
\begin{tabular}{|l|}
\end{tabular}
\caption{This table shows some data}
\end{table}
...


What am I doing wrong?

-
Welcome to TeX.SX! Are you loading the babel package? With what languages? – egreg May 9 '12 at 15:56
\usepackage[slovak,english]{babel} – peto1234 May 9 '12 at 15:57
It works for me. Can you give a full MWE. What are the class and other package details? – Harish Kumar May 9 '12 at 16:05
@HarishKumar; as soon as you load babel with the options mentioned by the OP in his comment, the redefinition using just \renewcommand... in the preamble will not work. – Gonzalo Medina May 9 '12 at 16:35
@GonzaloMedina: I have given the \renewcommand.. after the \begn{document} and it works. How come???? – Harish Kumar May 9 '12 at 16:49

Since you are loading babel, the simple

\renewcommand\tablename{new}


in the preamble, will not work. You can use either of the following options after loading babel:

\AtBeginDocument{%
\renewcommand\tablename{new}
}


or

\addto\captionsenglish{%
\renewcommand\tablename{new}
}
`
-
out of votes, but tomorrow I will visit again – Harish Kumar May 9 '12 at 17:02