In my PhD thesis, I have to do a small introduction in French, but the rest of the document is in English. In this introduction, I must have French supplements for the headings I’m referring to, however the following solution does not work. It seems that the supplement that is chosen when we do a reference is the one applied at the location of the heading. Is there a simple solution to fix this?
#set heading(numbering: "1.", supplement: [Chapitre])
= C'est une introduction en français
// It's displaying "Chapter 2", but I want "Chapitre 2"
Dans cette thèse on va voir @chap.
#set heading(supplement: [Chapter])
= This is a chapter in English <chap>
This is @chap.
Yes that’s what I do currently, I’m just asking in case there is a more general solution. I also understand that this is the correct behaviour for referencing headings, as when we redefine the supplement to “Appendix” at the start of the appendix, we want the references to appendices in the body of the document to display “Appendix”, not “Chapter”.
and then wrap any French chapters in a to text(lang: "fr")[ ... ]. If French is the default language of your document, and only some parts are in English, you can of course do the same with "en" instead of "fr".