I am currently writing a class and there I need to test the current language. Therefore I use the package iflang. A strange warning pops up when I change the default language, consider:

\noindent PATT: \the\l@dutch \\
LANG: \the\language

The code does not produce any warnings, but if I change the code to \setdefaultlanguage{dutch}, the package iflang produces a warning:

Package iflang Warning: Mismatch between \language (patterns)
(iflang)                and setting of \languagename.

despite the two variables having the same value. Is this a bug in the package?

1 Answer 1




the language name is dutch, but the language setting is still the default language 0 (USenglish). Thus the warning is correct. Package polyglossia sets the language later in \begin{document}.

The warning can be avoided:

  • Loading the package later, when polyglossia has set the language:

  • Or explicit setting of the language:

  • Or loading package iflang earlier:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .