# How to customize the "translation" option of a reference in amsrefs

Background: This is probably a rather basic question but I couldn't find any answer in the web. I am writing a text in a foreign language, and I am using the amsrefs package for the references.

General description of the problem: I would like to customize the words appearing in the displayed references (which are not part of the proper names or the title of the work) to be in the foreign language as well. For example, if the foreign language is German, I want to use "und" instead of "and" when listing the authors. The title and the names of the journal or editors should remain in the original language of the publication.

What I know: By slightly addying in my main .tex file some editions to the package amsrefs I have managed to change words such as "and" when listing the authors (see for instance Changing the language of an amsrefs generated bibliography), and some other minor similar changes.

My specific problem: I do not know how to solve the following problem. Say you have a reference of the form

\bib{XX}{article}{

author={AA},
title={TT},
language={Russisch},
journal={RR},
volume={1},
date={1990},
number={2},
pages={1--3},

translation={
journal={JJ},
volume={3},
date={2000},
number={4-5},
},

}


This is a reference of an article originally published in Russian in the journal RR in 1990 and later translated into English in the journal JJ in 2000. The words appearing in the generated .pdf file are "English transl.".

Question: how do you change the generated phrase "English transl." by the German "Englishe Übersetzung"?

The string is somewhat built in, so we need to patch the command.

\documentclass{article}
\usepackage{amsrefs}
\usepackage{xpatch}

\makeatletter\catcode'=11
\xpatchcmd{\bib@translation}
{English}
{Englische}
{}{}
\xpatchcmd{\bib@translation}
{transl.}
{\"Ubersetzung}
{}{}
\makeatother\catcode'=12

\begin{document}

\begin{bibdiv}
\begin{biblist}

\bib{XX}{article}{

author={AA},
title={TT},
language={Russisch},
journal={RR},
volume={1},
date={1990},
number={2},
pages={1--3},

translation={
journal={JJ},
volume={3},
date={2000},
number={4-5},
},

}

\end{biblist}
\end{bibdiv}

\end{document}