The HTML data contained in topic files can be localized as specified in the HTML 4.0 specification (http://w3c.org/TR/REC-html40/). Both the character encoding and the language can be set.
Character encoding is an unambiguous mapping of the members of a character set (letters, ideographs, digits, symbols, or control functions) to specific numeric code values. Character encoding can be set for HTML files in the following ways (listed in order of precedence):
If the HTML file is provided by a server via the HTTP protocol, the server can specify the character set using the charset parameter in the HTTP Content-Type field.
The HTML <META> declaration can be used to specify the character encoding. Encoding is specified using the charset parameter:
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=x-euc-jp">
The language can be set in HTML files in the following ways (listed in order of precedence):
The lang attribute specifies the language of a specific element (tag>. It can be applied to every HTML element except the following: <APPLET>, <BASE>, <BASEFONT>, <BR>, <FRAME>, <FRAMESET>, <HR>, <IFRAME>, <PARAM>, and <SCRIPT>.
The following is an example of the lang attribute being used with the <P> tag:
<P lang="en-US">
Any elements (tags) nested within a tag automatically inherit the parent tag's language.
The syntax of the lang attribute is:
lang | = language-code |
language-code | = primarycode ('-' subcode) |
primarycode | = ISO639 | IonaCode | UserCode |
ISO639 | = 2 alpha characters |
IonaCode | = (i | I) '-' (alpha characters) |
UserCode | = (x | X) '-' (alpha characters) |
subcode | = (alpha characters) |
For more information about the lang attribute, please refer to the HTML 4.0 specification at the World Wide Web Consortium web site (http://w3c.org/TR/REC-html40/).
The HTML <META> declaration can be used to specify the file's language. Language is specified using the Content-Language parameter:
<META http-equiv="Content-Language" content="en-US">
If the HTML file is provided by a server via the HTTP protocol, the server can specify the language for that file using the HTTP Content-Language header (for example, Content-Language:en-US).
See also: