# Why nomenclature text is not English when loading additional languages in document class?

I have troubles in getting the right language in nomenclature. Here is a minimal example:

\documentclass[english,italian]{article}

\usepackage[english,refpage]{nomencl}

\makenomenclature

\begin{document}

text

\nomenclature{Item}{Any kind of item}

\printnomenclature{}

\end{document}


My document is written in English but some of it has also an Italian translation, hence I load both languages. However by doing so the nomenclature gets Italian text:

As you may guess Elenco dei simboli means List of symbols (or Nomenclature) and pagina 1 means page 1. If I load only English they are in English.

I could just redefine the commands to print those texts:

\renewcommand*{\nomname}{Nomenclature}
\renewcommand*{\pagedeclaration}[1]{, page~#1}


but I wondered why they showed up in Italian in first place. Perhaps I am loading the languages in a wrong way (actually I got this source by exporting from LyX, and then trimmed it to the minimum, so it would be its fault).

-

## 1 Answer

1. Package nomencl uses \ProcessOptions without star. That means the options are processed in the order of declaration and not in order of usage. Option italian is declared after option english, therefore italian is executed last.

2. Even if nomencl would be fixed and would use \ProcessOptions* with star, you are out of luck here, because of the way LaTeX processes its options. If an option is used, its code is only executed once. That allows \newcommand in option code without worrying that the user might call the option twice. Global options are processed first and nomencl will ignore the local option english, because it has seen it already as global option.

3. Package babel will not help, because package nomencl does not support it and does not use babel's interface for language dependent strings, e.g.

% nomencl:
\addto\captionsenglish{\def\nomname{Nomenclature}}
\addto\captionsitalian{\def\nomname{Elenco dei simboli}}

% document:
\selectlanguage{english}
\printnomenclature


A solution is indeed to define the name macros explicitly. Package nomencl defines these in the code for option english:

\def\eqdeclaration#1{, see equation\nobreakspace(#1)}%
\def\pagedeclaration#1{, page\nobreakspace#1
\def\nomname{Nomenclature}%

-
Code in lists needs an extra set of indents :-) –  Joseph Wright Aug 5 '12 at 11:08