[Tex/LaTex] How to change the word “table”/”cuadro” for “tabla” using \cref

cleverefcross-referencingnaming

I´m starting using cleveref package. I like it.

But now I´m typing in spanish and when \cref is pointing to a table I want that use the word "tabla" instead "cuadro", in the text.

When I type "is \cref{tab:a1}" I want obtain "is tabla 2" and NOT "is cuadro 2"

I tried with this lines

\renewcommand{\listtablename}{Índice de tablas}
\renewcommand{\tablename}{Tabla} 

but this only changes the word below the table, as you can see.

Here is a MWE:

\documentclass{article}
\usepackage{subcaption}
\usepackage{graphicx}
\usepackage{mathtools,amsmath,amssymb}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[spanish]{cleveref}
\usepackage[spanish]{babel}


\begin{document}
\renewcommand{\listtablename}{Índice de tablas}
\renewcommand{\tablename}{Tabla} 

La \cref{tab:1a} es bonita(beautifull)\\

\begin{table}[h!]
\centering
\begin{tabular}[h!]{ccc}
\ $a$ & $b$ & $c$ \\
\hline 0 & 0 & 0 \\
\ 1 & 1 & label label-tab:1a \\
\end{tabular}
\caption{A subtable}\label{tab:1a}
\end{table}


\end{document} 

Best Answer

First of all I think it's worth to read answer to question "¿Por qué spanish para babel dice cuadro en lugar de tabla?" (Why spanish babel says "cuadro" instead of "tabla"?) in FAQ-CervanTeX (FAQ from spanish users group).

And in case you still insist in changing this word, adding es-tabla option to babel will do it. With cleveref some more customization is needed as lockstep suggested but I think something like

\crefname{table}{\spanishtablename}{\spanishtablename}

could be better than a hardcoded solution.

Last comment if spanish is passed as option to documentclass, it will be automatically passed to babel and cleveref.

\documentclass[spanish]{article}
\usepackage{subcaption}
\usepackage{graphicx}
\usepackage{mathtools,amsmath,amssymb}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[es-tabla]{babel}
\usepackage{cleveref}

\crefname{table}{\spanishtablename}{\spanishtablename}

\begin{document}

La \cref{tab:1a} es bonita (\emph{beautifull})\\

\begin{table}[h!]
\centering
\begin{tabular}[h!]{ccc}
\ $a$ & $b$ & $c$ \\
\hline 0 & 0 & 0 \\
\ 1 & 1 & label label-tab:1a \\
\end{tabular}
\caption{A subtable}\label{tab:1a}
\end{table}

\end{document}