Consider this example:
\documentclass{article}
\usepackage{graphicx}
%\usepackage[latvian]{babel}
\renewcommand{\figurename}{att.}
\begin{document}
\begin{figure}
\includegraphics{example-image-a}
\caption{cap}
\end{figure}
\end{document}
\renewcommand{\figurename}{att.} fails once I uncomment the line
\usepackage[latvian]{babel}.
The purpose is to override the settings in babel.
How to solve this problem?
\addto\captionslatvian{\renewcommand{\figurename}{att.}}. – Phelype Oleinik Nov 19 '18 at 17:11