Setting Language Codes in HTML Files

If you had a Web site containing documents in different languages, you could set the MS.Locale in each document for queries on documents in a certain language and the Content-Type variable so that the proper character set is displayed in the results. You should set both of these variables if your HTML pages are written in different languages.

Setting MS.Locale

MS.Locale specifies the language that the document is written in. This property also tells Index Server to use the correct locale-specific resources when processing the HTML page. You should set this variable when the HTML pages being indexed are on sites in different locales. If all the HTML pages being indexed are in the same locale as the server where Index Server is installed, then you do not have to include this property in your HTML files.

For example, to designate a locale of Japanese, set your MS.Locale meta tag as follows:


<META NAME="MS.LOCALE"   CONTENT="JA">

When you have included MS.Locale in your HTML files, clients can query for that property, as with any other meta tag property. For example, to see all the files in Japanese, send the following query:


@Locale JA

To find a list of recognized locale codes, see Valid Locale Identifiers.

Setting Charset

Charset is part of the HTTP-EQUIV meta tag to specify the character set of an HTML page. Index Server uses this character set to display the text in the HTML page in the proper characters. In a file written in Japanese, you would set the Charset to shift_jis as shown in the following example:


<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=shift_jis">

To find a list of recognized character set codes, see Recognized Character Set Tags.


© 1997 by Microsoft Corporation. All rights reserved.