Insert text based on language

Automatically insert custom text based on the language of the publication map.

At some point, you might need to insert different text based on the publication language. For example, let’s say you’ve been asked to include the publication language on the back cover of your PDF. The easiest way to do this is to grab the value of the xml:lang attribute and use it to determine which language name to output. There are several ways you could go about it, but here is one of the easiest approaches.

Note: This method only captures the main language of the document. It doesn’t handle a case where some topics have one value of xml:lang and some have another.

These steps assume you’ve added a back cover to your PDF. ...