Foreign Language

Screen readers can read page text in different languages with the correct accent, but only if the language of the page is specified correctly. This is true for webpages and documents.

Best Practices for Defining Page Language

According to the World Wide Web Consortium (W3C), the best way to define the language of your HTML and XHTML documents is with an attribute on the <html> tag. The W3C best practices state: "Always declare the default language for text in the page using attributes on the HTML tag, unless the document contains content aimed at speakers of more than one language" (2007, Sections 4.2–4.5).

Both Evolution and Canvas programmatically indicate the page is in English. If some content is in a different language, it is important to specify the language of the non-English content in the code. Our Simple Editor has a Languages button that allows you to highlight foreign-language text and then define that portion of the webpage as a different language with a <span> tag.

Specifying a Section of the Page as a Different Language

For example, say your content reads "Hasta la vista," and you need to indicate that it is Spanish. Follow these steps:

  1. Highlight the text.
  2. From the Languages menu, select the correct language as shown in Figure 5.
    Screen shot showing the language options in the Simple Editor.
    Figure 5. Choose a Language for a Section of Text
  3. Select Save.

The code looks like this: <p><span lang="es">Hasta la vista.</span></p>.


References

World Wide Web Consortium. (2007, April 12). Internationalization best practices: Specifying language in XHTML & HTML content. http://www.w3.org/TR/2007/NOTE-i18n-html-tech-lang-20070412/  
Updated September, 2020