NOTE: This requirement does not apply to individual words or to phrases that have become part of the primary language of the content.
Foreign passages or phrases are passages or phrases in a language that is different from the language of the surrounding text.
programmatically determined means that the specific value can be determined in a standard, machine or software readable form.
The intent of this success criterion is to ensure that user agents can correctly present content written in a language that is different from the language of the delivery unit as a whole. This applies to graphical browsers as well as screen readers, Braille displays, and other voice browsers.
Both assistive technologies and conventional user agents can render text more accurately if changes of language within the delivery unit are identified. Screen readers can switch to the pronunciation rules for the language of the foreign text, then switch back to the pronunciation rules of the primary language at the end of the foreign phrase or passage. Visual browsers can display characters and scripts in appropriate ways. This is especially important when one language reads from left to right and the other reads from right to left, or when the foreign phrase or passage uses a different alphabet than the primary language. Users with disabilities who know the language of the foreign passage or phrase as well as the language of the delivery unit as a whole will be better able to understand the content.
Editorial Note: In future Working Drafts, this section will contain links to relevant sections of General Techniques for WCAG 2.0. The information below is presented to indicate the types of material that are available.
The W3C’s Internationalization Working Group recommends use of language tags following the method described in RFC 3066. This RFC in turn relies on the ISO 639 standard list of Codes for the Representation of Language Names, usually referred to as ISO 639.
Use the two-letter codes defined by the ISO 639 standard to identify the language of the delivery unit. (ISO 639-2 also defines a number of three-letter codes, but RFC 3066 requires use of the two-letter codes whenever these are available.)
Example 1: Gujarati
The two-letter language code for Gujarati, one of India’s 15 official languages (Gujarati is also spoken by nearly a million people in the United States) is "gu."
Example 2: Japanese
The two-letter language code for Japanese, another language spoken by more than 100 million people, is "ja."
Example 3: Swahili.
The two-letter language code for Swahili, spoken by approximately 50 million people in Africa (especially East Africa) is "sw."
Country codes are defined in ISO standard 3166. Country codes may be used together with the two-letter language tag to identify national or regional variants of a language.
Editorial Note: How should we deal with languages for which there is no language code? According to UNESCO, "90% of the world’s languages are not represented on the Internet." See . RFC 3066 describes a procedure for registering new language codes, just as Unicode has a procedure for defining character-sets. Would this SC allow conformance claims for delivery units with foreign passages when the language has been registered with IANA and when the character-set is defined for Unicode (?).
Example 1: Canadian French
The code to identify French as spoken in Canada is "fr-ca."
Example 2: Brazilian Portuguese
The code to identify Portuguese as spoken in Brazil is "pt-br."
HTML Techniques
Advisory techniques: going beyond Guideline 3.1 L2 SC1
Make foreign passages or phrases visually different from other text in the delivery unit.
Give the names of any languages used in foreign passages or phrases.
This success criterion helps :
people who Use screen readers or other technologies that convert text into synthetic speech;
people with learning disabilities and cognitive limitations that make it difficult to recognize (decode) individual words and sentences;
people who rely on captions to recognize language changes in the soundtrack of multimedia content.
Example 1: A Web site about ancient Greek literature.
A Web site discusses Friedrich Nietzche’s views of Greek tragedy from Aeschylus to Sophocles. English is the primary language of the delivery unit. The delivery unit includes quotations from Nietzsche’s work in German as well as passages in ancient Greek from Aeschylus’ Oresteia and Sophocles’ Oedipus at Colonus.
Example 2: Captions for a multimedia soundtrack.
A French academic Web site discusses Asian film of the 1990s. French is identified as the natural language of the delivery unit as a whole. The site includes three 20-second video clips which illustrate important points. The dialogue of the first clip is in Chinese. The dialog of the second clip is in Japanese. The actors in the third clip are speaking Hindi. In each case, the language of the captions is identified.
Example 3: Text with foreign words that have become part of the delivery unit’s language.