HTML Techniques-07

2.1 Identifying changes in
language


Checkpoints in this section:

  • 4.1 Clearly identify changes in the natural language of a
    document's text and any text equivalents (e.g., captions).
    [Priority 1]

If you use a number of different languages on a page, make sure that any
changes in language are clearly identified by using the "lang" attribute:

Example.

<P>And with a certain <SPAN lang="fr">je ne sais quoi</SPAN>, 
   she entered both the room, and his life, forever. <Q>My name
   is Natasha,</Q> she said. <Q lang="it">Piacere,</Q>
   he replied in impeccable Italian, locking the door.

End example.

Identifying changes in language are important for a number of reasons:

  1. Users who are reading the document in braille will be able to substitute
    the appropriate control codes (markup) where language changes occur to ensure
    that the braille translation software will generate the correct characters
    (accented characters, for instance). These control codes also prevent braille
    contractions from being generated, which could further confuse the user.
    Braille contractions combine commonly used groups of characters that usually
    appear in multiple cells into a single cell. For example, "ing" which usually
    takes up three cells (one for each character) can be contracted into a single
    cell.
  2. Similarly, speech synthesizers that "speak" multiple languages will be able
    to generate the text in the appropriate accent with proper pronunciation. If
    changes are not marked, the synthesizer will try its best to speak the words in
    the primary language it works in. Thus, the French word for car, "voiture" would be pronounced "voter" by a speech synthesizer
    that uses English as its primary language.
  3. Users who are unable to translate between languages themselves, will be
    able to have unfamiliar languages translated by machine translators.
Is this fast? If not Try to catch one...!