I write a document, whose primary language is English. But I have some glossary entries whose names (aka label) are in German, but the description, etc. is in English again. I use the packages glossaries and babel.

So, some of my glossary definitions look like this:

    description={(ger.) German word for Bar.}%

Additionally, I want every entry in the glossary to start with a capital letter. Hence, I redefined


in the preamble. This results into a compilation error.

! Illegal parameter number in definition of \languagename

Instead, if I protected the argument with an addition {}, i.e.


the compilation is successful, but then the whole entry is capitalized not only the first letter. But that's not what I want.


The simple solution is to define a new command to switch the language


and then define the glossary entry as

    description={(ger.) German word for Bar.}%

instead. This way, the first argument of \foreignlanguage is hidden from \makefirstuc. Of course, a more general solution that could deal with arbitrary bi-parametric macros would be nice, but it is OK, because German is the only second languange that I need in my document.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.