[Tex/LaTex] How to translate keywords of algorithmic package

algorithms

How do I translate standard keywords of the algorithmic package like (if, then,…) to my language?

If possible, I would like to do it without looking into source of algorithmic or algorithm.

Best Answer

You don't need to look into the source code. The documentation of algorithms has an extra section with the following introduction:

In order to facilitate the use of this package with foreign languages, all of the words in the output are produced via redefinable macro commands. The default definitions of these macros are:

...
\newcommand{\algorithmicend}{\textbf{end}}
\newcommand{\algorithmicif}{\textbf{if}}
\newcommand{\algorithmicthen}{\textbf{then}
...