Go to page:

Search:   Help



LyX documentation


Shared groups


LyX /


Categories: i18n
<< | Page list | >>

About internationalized labels


Most of the labels, like "Table of contents", are automatically translated into the document language. This is done by the LaTeX-package babel, that is always loaded by LyX in the background. But babel doesn't translate all labels, that are introduced by some document classes. These labels need to be translated manually.
This page will give an overview about the necessary preamble commands to translate labels in dependence of the used document classes.

Method of translation


Labels are often part of a LaTeX-environment. Environments appear in LaTeX as

\begin{environment name}
\end{environment name}

To translate a label, we have to redefine the environment. This is done in the preamble with the command

\renewenvironment{environment name}{begin command}{end command}

For begin and end we need a new environment with the new label.
E.g. to translate the label "Example" to German "Beispiel", define a new environment:


A theorem is a special form of an environment. exa is the name of our environment and Beispiel its label. \theoremstyle defines how the theorem will look in the output. To assure that we are using the same style as the original theorem, we must specify the style in front of the new theorem. For many environments the style is plain, some environments do not need a specified style; the below list will show you what is needed.
We can now redefine the existing environment "example":


In summary we overwrote the existing environment with a new one. All that we have to know, is the name of the existing environment and the form of its definition (theorem or not).

But be careful, you must not translate labels wich are not used in your document. This will cause an error. Just comment unused translations out:



Labels of floats can easily be changed with the command

\floatname{name of float}{label}


To change labels that are automatically translated by the LaTeX-package babel, you need to load it in the preamble together with the language options used in your document. For example when you have a document that uses the new German orthography call babel with the preamble line


The new label name is set by this preamble line construct:


This preamble line replaces babels German index name with "Stichwortverzeichnis". The command \captions<language> must be adjusted according to the used language. So it is for an English document the command \captionsenglish.

To change another label than the index, replace the command \indexname by \<label>name. A list of the possible names can be found here:


To change for example the name of the label "Figure" in French by "Image" you need these preamble lines:


Preamble commands for special LaTeX-classes

In the following, all labels are translated into French. Every section includes a downloadable example file, so that you can easily copy the code from the preamble and replace the French names by the one you need.


Example file: lang-algorithm.lyx



Example file: lang-ams.lyx

In the original definition, all environments are numbered within the section number. To have this for the redefined environments, add a \numberwithin command for every environment, e.g.


as it is done in the example file.

  • Theorem:
  • Corollary:
  • Lemma:
  • Proposition:
  • Conjecture:
  • Criterion:
  • Algorithm:
  • Fact:
  • Axiom:
  • Definition:
  • Example:
  • Problem:
  • Condition:
  • Exercise:
  • Remark:
  • Claim:
  • Note:
  • Notation:
  • Summary:
  • Acknowledgement:
    \newtheorem{ackno}{Action de grâce}
  • Case:
  • Conclusion:
  • Proof:


First approach

Example file: lang-beamer.lyx

  • Definition:
  • Definitions:
  • Fact:
  • Corollary:
  • Theorem:
  • Example:

Second solution (no redefinitions needed)

Till Tantau created a package name translator, currently not sufficiently documented to deserve a real publication as a package.

To have it working:

revision after the last stable release (3.06);

  • nothing else needed.
  • but currently, only German language supported, French coming soon.

Alternative method by using a macro

Based on the previous methods discussed above, I've built a macro which can be easily used to translate any environment. Here is the code:

% translatethm macro parameters:
% #1 (optional) Style of theorem. Default to "plain".
% #2: Name of the existing theorem environment (example, problem, etc.)
% #3: String of the translation (e.g. Beispiel in German replacing Example, etc.)
% For instance, a possible use of the command is: \translatethm{example}{Beispiel}
                \renewenvironment{#2}{\begin{#2trans}}{\end{#2trans}}} }

As described in the comments of the macro, a possible use is:
or also with a different style it could be:

Using this macro we do not have to be worried about whether the environment 'example' is or not used in the document.

Note that it does not work with starred environments (unnumbered), but another similar macro can be defined changing newtheorem by newtheorem*.


Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2010-10-07 21:28 CEST