3.2. Use the lang attribute to indicate a change of language

If some of the content is in a language other than the primary language of the page, it should be specified with the lang attribute.

For example, on an English page:

<a href="…" lang="fr" hreflang="fr">Version française</a>

Tip

If one element does not enclose all of the foreign language content, encapsulate it with a <span> or <div> tag and give it the appropriate lang attribute.

Note

It is not necessary to announce a change of language for:

  • Proper names.
  • Foreign words that have been incorporated into the dictionary of the primary language.
  • Foreign words that are pronounced and understood with the accent of the principal language (i.e. “RSVP”, if the primary language is English).

Find out more

Comments

Add a comment

Required fields are marked *.

Back to top