%Language% Attributes
= Index DOT Html by Brian Wilson =

Main Index | Element Tree | Element Index | HTML Support History

What are the Language Attributes?
These attributes facilitate the rendering of documents that use multiple languages or character sets - especially bi-directional language situations.

This attribute category draws its inspiration from a Parameter Entity in HTML 4.x called "%i18n" (short for "internationalization" - 'i', followed by 18 letters in between, followed by 'n'.) The HTML 4.x category includes only the "dir" and "lang" attributes.

The other attribute in the "Language" category on this site (called, curiously enough, "language") is IE-specific and indicates the scripting language in use for the element. Although this attribute deals with a computer language rather than human languages as the other two attributes do, the common grouping made sense (to me.)

Language Attributes
[2|3|3.2|4] [X1|X1.1] [IE5B2|N6|O7.1]
Required? No
This attribute is used to indicate the directionality of the flow of the content for the current element. This becomes most helpful in bi-directional language scenarios where intrinsic dimension may be ambiguous. On block elements, this attribute indicates the base directionality of the text in the block. For inline elements this attribute starts a new embedding level for direction-dependent content. If this attribute is omitted for an inline element, a new embedding level is not created.
Values: ltr | rtl
[2|3|3.2|4] [X1|X1.1] [IE4|N|O]
Required? No
This attribute is used to specify the language of the enclosed content. This property can be useful in several ways - it can be used to ensure proper display of language-specific character usage (such as quotes or decimal points), for speech synthesis, search engine content classification or clarification of ambiguous character usage.

This attribute takes as its value a string that identifies a language system used for communication (with the exception of computer languages.) The syntax and registry of HTML language tags is identical to the system specified in RFC 1766. A language tag is composed of one or more parts: A primary language tag and a possibly empty series of subtags:
   language-tag = [Primary Language Tag] ("-" [Language Subtag])*
   [Primary Language Tag] = "i" (for IANA defined languages) | "x" (custom/private use language) | [ISO 639 2-letter Language Code]
   [Language Subtag] = [ISO 3166 2-letter country code] | [dialect or other locale/situation specific language]
Language tags are case-insensitive and spaces are not allowed. The registering of language tags is administered by the Internet Assigned Numbers Authority (IANA). Example language tags include:
The LANG attribute overrides any language value specified by any parent elements of the current element. If no value is specified at any of these levels, the language inheritance mechanism goes up to the HTTP protocol header 'Content-Language.' If this is also not specified, a default may be determined from the user's browser settings or some other criteria.
Valid RFC-1766 values representing a hierarchy of language tokens.
[2|3|3.2|4] [X1|X1.1] [IE4|N|O]
Required? No
This attribute is used to specify the current scripting language in use for an element. 'JScript' and 'javascript' both refer to Javascript engines. 'Vbs' and 'Vbscript' both refer to Vbscript engines. 'XML' refers to an embedded XML document/fragment.
JScript [DEFAULT] | javascript | vbs | vbscript | XML
Tips & Tricks Browser Peculiarities
Boring Copyright Stuff...