TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to translate the algorithm enumeration into another language, it is always printed in English:

  • Algorithm 1 [Title]
  • Algorithm 2 [Title]
  • ...

I am using the algorithm2e package.

share|improve this question
up vote 3 down vote accepted

With the algorithmic environment, you're probably using the algorithms bundle or possibly the algorithmicx package (both provide that environment). The algorithm environment's name is stored in \ALG@name that you can modify using \renewcommand.

Here's a way to modify the default Algorithm to your liking:

enter image description here

\usepackage{algorithm}% http://ctan.org/pkg/algorithms
\usepackage{algpseudocode}% http://ctan.org/pkg/algorithmicx
\renewcommand{\ALG@name}{Algoritme}% Afrikaans
  \caption{Hierdie is 'n algoritme.}
    \State Iets
    \State Iets anders

Note that this is actually independent of the algorithmic environment.

The algorithm2e package is a more complete package in the sense that it provides its own algorithm environment. It also supports a number of language options by default, including english, french, czech, german, portuguese, italiano, and slovak. For example, using (from the algorithm2e documentation):

\usepackage[portuguese]{algorithm2e}% http://ctan.org/pkg/algorithm2e
  \KwData{this text}
  \KwResult{how to write algorithm with \LaTeX2e }
  \While{not at end of this document}{
    read current\;
      go to next section\;
      current section becomes this one\;
      go back to the beginning of current section\;
  \caption{How to write algorithms}


enter image description here

These language options set a number of commands other than just the algorithm name (stored in \algorithmcfname). Here's an extract for the portuguese language option:

\renewcommand{\listalgorithmcfname}{Lista de Algoritmos}%

If your language is not supported here, you can perform the manual redefinitions yourself using a similar setup to the language settings above. If you just have a couple of changes that doesn't affect many components of your document, using

\renewcommand{\algorithmcfname}{Algoritme}% Afrikaans "Algorithm"

should work. You may also want to define your keywords accordingly.

share|improve this answer
I've been looking at the wrong package, I am using the algorithm2e package. – platzhirsch Jan 13 '12 at 19:19
@platzhirsch: algorithm2e is shipped with a number of language options. I've updated my answer to reflect those. – Werner Jan 13 '12 at 19:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.