Using HTML Language to make foreign languages accessible

One of the ingredients of an accessible HTML document (a.k.a. a webpage) is the document language needs to be set. This tells the screen reader or other assistive technology the language in which the document has been created so it can be read in the native language or translated into a different language easily.

In the CMS, English, or "en" is set as the default language, like this:

<html lang="en">....</html>

And when you change the language, you can do so in the source code view by adding a lang= attribute, and then the HTML language code, which are normally two letters. Here's how it is implemented on a <span> tag changing that particular span to Spanish.

Identify Changes of Language Within a Document:

<p>While in Spain, my friend tried to speak Spanish, but she wasn't very good. Everyone kept saying "<span lang="es">No comprendo nada de lo que dices.</span>"</p>

See HTML Language Code Reference for a complete listing of language codes.

Was this article helpful? 0 out of 0 found this helpful

Have more questions? Submit a Support Ticket