Change language for references of chapters

I set the language to German with

#set text(lang: "de")

Then I have a chapter:

= chapter1 <chapter1>

= chapter2
In @chapter1 steht xy.

Unfortunately there is still “In Chapter 1 steht xy.” in the PDF instead of “In Kapitel 1 steht xy.” For figures, tables, etc. setting the language works. What am I missing?

It works in the minimal example document, which looks like this:

#set text(lang: "de")
#set heading(numbering: "1.1")
= chapter1 <chapter1>
= chapter2
In @chapter1 steht xy.

So then I guess that you might have a problem with how your setting is applied. Please share the relevant code or a minimal example that has the problem, then it can be solved.


I realize now that since Chapter is not the default supplement, it’s probably a template that’s explicitly setting it to use ‘Chapter’. The english default would be Section. Look at which templates you are using (and if they can be configured.)

2 Likes

Thank you very much!

This was a template problem I wasn’t aware of. It’s in English and I changed it to German and missed a setting.

One can use “supplement” of the heading function to define how the reference is called. This was set to “Chapter”, I changed it and now everything works fine.

2 Likes