Bug Tracker 
| ID | 316🔗 |
|---|---|
| Submitted by: | Denis Bitouzé |
| Date: | 2026-05-16 13:19:11 |
| Last update: | 2026-05-18 10:10:17 |
| Status | Closed (Migrated) |
| Category | glossaries-extra |
| Version | 2.1 |
| Summary | French instead of English rules applied in case both languages are loaded in this order at \documentclass' level |
| Cross Ref | 315 |
Sign in to subscribe to notifications about this report.
Description
When thebabel's languages french and english are loaded in this order at \documentclass' level, the rules applied regarding the plural of the short forms of abbreviations are the French ones instead of the English ones. Note that this issue:
- doesn't arise if only the
englishlanguage is loaded, - doesn't arise if the
frenchandenglishlanguages are loaded (only) at the\usepackage{babel}' level, - arises with the
glossariespackage as well.
MWE
Download (739B)
\listfiles
\documentclass[a4paper,french,english]{article}
\usepackage{babel}
\usepackage{glossaries-extra}
\makeglossaries
\newabbreviation{dvd}{DVD}{Digital Video Disc}
\newabbreviation{lug}{LUG}{Linux Users Group}
\begin{document}
\begin{itemize}
\item The current language is English: \today{}.
\item But \texttt{glsxtrabbrvpluralsuffix=\glsxtrabbrvpluralsuffix}.
\item \renewcommand{\glsxtrabbrvpluralsuffix}{s}%
Despite \verb|\renewcommand{\glsxtrabbrvpluralsuffix}{s}|
(now \texttt{glsxtrabbrvpluralsuffix=\glsxtrabbrvpluralsuffix}), the
shortplural forms are not followed by an `s':
\begin{itemize}
\item \gls{dvd}, \glspl{dvd}.
\item \glspl{lug}, \gls{lug}.
\end{itemize}
\end{itemize}
\printglossary
\end{document}
Evaluation
The plural suffix expands by default when the abbreviation is defined. This allows the suffix to be changed before a block of abbreviations are defined that require a particular suffix.
You can test this with \showgloshortplural{dvd} (after the dvd abbreviation is defined) which shows DVD because the French setting has redefined \glsacrpluralsuffix to expand to nothing. With the language passed through the document class as in your example, French is the language currently in effect when the abbreviations are defined.
If the language settings are passed to babel using
\usepackage[french,main=english]{babel}
Then the language in effect when the abbreviations are defined is English, so \glsacrpluralsuffix expands to \glspluralsuffix which expands to “s”. In this case, \showgloshortplural{dvd} shows DVDs.
If you want to retain the language-sensitive command within the shortplural field you will need to prevent it from expanding:
\renewcommand\glsxtrabbrvpluralsuffix{\noexpand\glsacrpluralsuffix}
\newabbreviation{dvd}{DVD}{Digital Video Disc}
\newabbreviation{lug}{LUG}{Linux Users Group}
I'm sorry for the misunderstanding. glossaries-extra is behaving as intended. The issue is with tracklang. Issue migrated to #317.
Update: the issue has now been fixed in tracklang v1.6.7.
Comments
6 comments.
Date: 2026-05-17 17:15:28
Repying to: Denis Bitouzé 2026-05-17 16:46:28
It's tracklang not glossaries or glossaries-extra that picks up the document class options. It seems that tracklang is processing them in the order in which the options are defined rather than in the order in which they are listed. I'm not sure why. I need to look into it.
However, regardless of the order, \newabbreviation is designed to fully expand the short plural suffix when the term is defined. This is by design and existing documents may be expecting that behaviour to continue, but I realise this isn't documented, so I will clarify in the next version. If you want the suffix to change with the current language you need to prevent expansion by redefined \glsxtrabbrvpluralsuffix as shown.
Date: 2026-05-17 17:38:33
Repying to: Nicola Talbot 🦜 2026-05-17 17:15:28
I'm sorry, I may have misread your original message. Were you wanting the suffix to change with the language within the document?
If the problem is the order that the language files are loaded, then I'll migrate this to tracklang.
Date: 2026-05-17 19:23:28
Repying to: Nicola Talbot 🦜 2026-05-17 17:15:28
>If you want the suffix to change with the current language you need to prevent expansion by redefined \glsxtrabbrvpluralsuffix as shown.
Sorry but I probably miss something in this advise. Indeed, the following MWE:
\documentclass[a4paper,french,english]{article}
\usepackage{babel}
\usepackage{glossaries-extra}
\makeglossaries
\renewcommand\glsxtrabbrvpluralsuffix{\noexpand\glsacrpluralsuffix} % <- As advised
\newabbreviation{dvd}{DVD}{Digital Video Disc}
\newabbreviation{lug}{LUG}{Linux Users Group}
\begin{document}
\begin{itemize}
\item The current language is English: \today{}.
\item But \texttt{glsxtrabbrvpluralsuffix=\glsxtrabbrvpluralsuffix}.
\item \renewcommand{\glsxtrabbrvpluralsuffix}{s}%
Despite \verb|\renewcommand{\glsxtrabbrvpluralsuffix}{s}|
(now \texttt{glsxtrabbrvpluralsuffix=\glsxtrabbrvpluralsuffix}), the
shortplural forms are not followed by an `s':
\begin{itemize}
\item \gls{dvd}, \glspl{dvd}.
\item \glspl{lug}, \gls{lug}.
\end{itemize}
\end{itemize}
\printglossary
\end{document}
still doesn't add an ‘s’ to ‘DVD’ and to ‘LUG’.Date: 2026-05-17 19:28:49
Repying to: Denis Bitouzé 2026-05-17 19:23:28
I'm sorry I just quickly checked by adding \showgloshortplural{dvd} after the definition, which shows DVD\glsacrpluralsuffix. I will have to leave it until I have more time to look at it properly.
Date: 2026-05-17 19:28:58
Repying to: Nicola Talbot 🦜 2026-05-17 17:38:33
>Were you wanting the suffix to change with the language within the document?
No, my main point is the following: when several languages are specified at\documentclass level only, I'd like glossaries-extra to respect the rules
of the language in force at the beginning of the document, that is the last one
specified.
Add Comment
Page permalink: https://www.dickimaw-books.com/bugtracker.php?key=316

Date: 2026-05-17 16:46:28
Thank you.
As my minimal example shows, if languages are specified at the
\documentclasslevel, the language in effect after (or at the time of)\begin{document}is the last one specified, in this caseenglish; it therefore seems strange that this is not the case when theabbreviation is defined.
Furthermore, specifying
babellanguages at the\documentclasslevel is (or was in the
babeldocumentation) the recommended method:this way, other language-sensitive packages that are loaded (such as
varioref) do not need such a (duplicate) parameter. It would thereforebe desirable for the language configuration method used in my MWE to work with
glossaries-extra.