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.
algorithm2elanguagesnaming
I would like to translate the algorithm enumeration into another language, it is always printed in English:
I am using the algorithm2e package.
Best Answer
With the
algorithmic
environment, you're probably using thealgorithms
bundle or possibly thealgorithmicx
package (both provide that environment). Thealgorithm
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: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 ownalgorithm
environment. It also supports a number of language options by default, includingenglish
,french
,czech
,german
,portuguese
,italiano
, andslovak
. For example, using (from thealgorithm2e
documentation):produces
These language options set a number of commands other than just the algorithm name (stored in
\algorithmcfname
). Here's an extract for theportuguese
language option: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
should work. You may also want to define your keywords accordingly.