Customizing your search solution is important only if you want to let your users conduct language-specific searches. You specify the language of a template by inserting a language identifier in the META tag of your templates or HTML files. The language identifier can also be used in Search Results pages to let users quickly recognize the search results that interest them.
NetWare Web Search Server also lets Web clients specify their locale at the time the search query is entered. The default Search page illustrates this feature by auto-detecting a user's locale and selecting the appropriate language from the Display Language drop-down list. This selection sends two parameters to the Web Search Server: language and country. The country parameter is almost always blank. The search engine uses this information to find locale-specific versions of the templates used to return search results.
To specify the language of a template or of any HTML content that gets indexed as part of your virtual search server, you must enter a language identifier within an HTML file's header section. For example, if you wanted to identify a Russian template, you would add the following META tag:
<meta http-equiv="Content-Language" content="ru">
In some cases, such as Traditional and Simplified Chinese, you will need to use the two-character, uppercase country codes. For example:
<meta http-equiv="Content-Language" content="zh-TW"><meta http-equiv="Content-Language" content="zh-CN">
The first line of the example indicates the Chinese language (ZH) and the geographic location as Taiwan. The second line of the example indicates the Chinese language (ZH) but China as the geographic location.
This combination of language and country codes is called a locale. For more information about locales, refer to Table 17.
NetWare Web Search Server consists of three primary servlets: SearchServlet, PrintServlet, and AdminServlet. Each servlet returns information to the Web client using server-side templates. Templates are stored on at volume:\searchroot\TEMPLATES. For more information about templates, see Understanding Templates.
After determining a Web client's locale, Web Search attempts to locate a matching search result template. That is, each of the Web Search services automatically attempts to locate a version of the requested template that most closely matches the Web client's locale.
IMPORTANT: NetWare Web Search cannot find locale-specific templates without the two-character language code and the optional two-character country code. See Table 17 for more information about language code syntax.
For example, if a Web client requests to see search results using the ResultListTemplate.html file and the client is a Chinese language user from Taiwan and the server is Russian, then Web Search will try to find a Chinese-Taiwan version of the template first (ResultListTemplate_zh_TW.html) because that exactly matches the client's language and country. The following table lists the template names the system would look up in this example in order of priority.
If this scenario were reversed so that the search client was Russian and the server was Chinese (Taiwan), and the client requested the ResultListTemplate_ja.html template, then the lookup order would follow the order shown in the following table.
All templates undergo this rigorous lookup system. Once a template is located, its name is stored and associated with the original client locale so that all subsequent requests for that template from the same locale automatically find the template without performing the same rigorous lookup.
No further lookups are attempted for that combination of client locale and template name until the NetWare Web Search Server is restarted. If all template lookups fail, then an error message is returned to the client performing the search.