[[include:_PageDate name=Setting-Language-Attributes]] Return to the CommonLook blog

Why Language Attributes Matter

PDF icon. Download the Language Attributes demo PDF.

In PDF, the language of content is handed in two ways (actually, more than two, but we’re keeping it simple for this demonstration).

While it’s important to ensure that the document’s primary language is correctly set, it’s also critical to ensure that  language changes within the document are marked appropriately. The tags enclosing the appropriate content must include attributes that correctly identify the language.

Without this attribute in place assistive technology may attempt to read all the document’s content using settings appropriate to the document’s primary language, and ignoring the fact of French, German or other text interspersed with content in the document’s primary language.

In this example we try to make clear how the language attributes of individual page content elements can affect the performance of assistive technology.

Setting language attributes for page content

CommonLook PDF may be used to identify the language for individual tags using the following procedure.

  1. Ensure the content that differs in language from the document’s primary language is contained in its own tag. This may be a <Span> tag (for individual words within a paragraph), or a <Sect>, <P> or other tag, as appropriate. 
  2. In either Logical Structure Editor or Verify and Remediate modes, select the tag. 
  3. Click the “Properties” tab under the Physical View, then adjust the Language setting for the selected tag to the appropriate language, as shown below:

A selected tag has its Language property set to "French."

The product documentation provides more information on managing language using CommonLook PDF.

CommonLook Tips

In these Tips we provide individual best-practice rules for tagging PDF documents.

In each case a specific situation is described, and model tags provided.

If applicable, we also provide an example of incorrect tagging on the same point so that users can test their assistive technology to determine whether it supports the described feature.

If there’s a Tip you’d like us to cover, please let us know!

What Failure Looks Like

For demonstration purposes the PDF file includes the same French content, but without a language attribute.

Since the document’s primary language is set to English, assistive technology will probably attempt to read this paragraph in English (unless it’s very smart technology, with the ability to automatically detect the language of content and adjust accordingly). 

Applicable Standards 

Language identification requirements are present in:

  • WCAG 2.0
  • PDF/UA
  • State of Oklahoma standards (document level requirement only)

The 2001 Section 508 requirements (§1194.22) do not mention language identification.

Return to the Blog