Identify Language

7. Provide Identification for Languages

Princeton's Drupal templates will default to identifying the English language as the language of each page. If you are authoring content inside of a page that is a language other than English you will have to identify the language code for that piece of content. A screen reader needs to understand which language text content is written in so it can read the text aloud in that language. 

Best Practices

  • At this time, the Drupal CMS has no easy way to identify languages on pieces of text other than using the source code editor

Don't do This

Incorrect Identification of Language

The following passage is written in French, but is not programmatically identified as French.  


Il était une fois une maman cochon qui avait trois petits cochons. Elle les aimait beaucoup, mais comme il n'y avait pas assez de nourriture pour qu'ils puissent tous manger à leur faim, elle les a envoyé tenter leur chance dans le vaste monde.


Source: Three Little Pigs passage from The French Experiment

Why Is This Wrong?

A screen reader would assume the language is English, which is the language identified for the page, and read the passage with the incorrect pronunciation. The source code must be edited to include <p lang="fr"> in the paragraph tag.

Do This

Correct Identification of Language

The following passage is written in French, and is programmatically identified as French.


Il était une fois une maman cochon qui avait trois petits cochons. Elle les aimait beaucoup, mais comme il n'y avait pas assez de nourriture pour qu'ils puissent tous manger à leur faim, elle les a envoyé tenter leur chance dans le vaste monde.


Source: Three Little Pigs passage from The French Experiment

Why is This Right? 

Because the source code has the <p lang=”fr”> identified, the screen reader will read the passage with a French pronunciation.