I'm trying to make a latex document in spanish, I've successfully imported the babel package for the language, but the \listoflistings command does not get translated to spanish. Also captions for listings are not translated. I've tried to renew these commands: \renewcommand{\lstlistingname}{Listado} \renewcommand{\lstlistlistingname}{Índice de listados}. Note that I'm also using minted.
Here is the code (MWE):
\documentclass[12pt, twoside, openright]{report}
\usepackage[utf8]{inputenc}
\usepackage[spanish]{babel}
\usepackage{listings}
\usepackage{minted}
\renewcommand{\lstlistingname}{Listado}
\renewcommand{\lstlistlistingname}{Índice de listados}
\begin{document}
\listoftables
\listoflistings
\chapter{Introducción}
\pagenumbering{arabic}
\setcounter{page}{1}
% \subimport*{./}{chapter01.tex}
\begin{listing}[H]
\begin{minted}[linenos,frame=lines, framesep=2mm,numbersep=5pt]{scala}
val immutableInt = 2
immutableInt = 3 // Compile Error
var mutableInt = 4
mutableInt = 2 // OK
\end{minted}
\caption{val versus var}
\label{lst:scala_valvar}
\end{listing}
\end{document}
Any help would be appreciated.