<content-language> Content Language

Identifies one language used in this book, book-part, or collection, by containing an ISO 639 code.

Usage/Remarks

Best Practice

The <content-language> element should appear once for each language used in the text of a multi-lingual book, book-part, or collection. This does not mean a language used only for small quotes and the like, but one of the languages that have been used for significant content. For Best Practice, the content of <content-language> should be the two-letter ISO 639 code for the language, for example, “en” for English, “de” for German, or “es” for Spanish.
In addition:
  • There is almost no value to using <content-language> on a mono-lingual book, book-part, or collection (although this is not prohibited).
  • The use of @xml:lang to hold a language code value for a top-level element strongly implies a mono-lingual document.
In conjunction with @xml:lang
For multi-lingual documents, the @xml:lang attribute may be omitted from the book, book-part, or collection element; alternatively the document may use the 3-digit ISO 639-2 value “xml:lang="mul"”, indicating multiple primary languages are used.
This tag set is agnostic on how “primary” is defined, leaving that decision to each producer. However, the intent of this element is to record the principle languages used in a multi-lingual book, book-part, or collection rather than to state that a few quotations in another language occur in an essentially mono-lingual document.
Related Elements
How to Tag the Language: In BITS, there are two ways to describe the natural language of the content of a document:
  • XML Lang Language Attribute: The @xml:lang attribute can be put on many elements, to indicate the language of that element and its descendants. This is an inherited value, so that element and all of its children will be in the named language, unless specifically overridden by another @xml:lang attribute. Thus a language code on the top level element of a document (in the case of BITS, a book, book-part, or collection) names the only primary language in a mono-lingual book, book-part, or collection or can be the value “xml:lang='mul'” to indicate that the book, book-part, or collection has multiple primary languages. Since (as of 2025) the value “mul” is rarely used, a multi-language book, book-part, or collection can just omit the @xml:lang attribute at the top level.
  • Content Language Element: The element <content-language> (in the metadata of a book, book-part, or collection) identifies the language(s) used in the document. The element appears once for each language used in the document. For Best Practice, the <content-language> content should be the two-letter ISO 639 code for the language, for example, “en” for English, “de” for German, or “es” for Spanish.
Attributes

Base Attributes

Models and Context
May be contained in
Description
Text, numbers, or special characters, zero or more
Content Model
<!ELEMENT  content-language
                        (#PCDATA %content-language-elements;)*       >
Expanded Content Model

(#PCDATA)*

Tagged Sample

2 variants of a figure, with <processing-meta> and <content-language>

<book  dtd-version="2.2"  xml:lang="mul">
 <processing-meta lang-grouping="yes"
   tagset-family="bits"
   mathml-version="3.0"
   table-model="xhtml"></processing-meta>
 <book-meta>
  <book-title-group>...</book-title-group>
  <content-language>fr</content-language>
  <content-language>en</content-language>
 </book-meta>
</book>