Language File

Last modified: 15 August 1997.

Page Contents Overview  Using a Language File  Language File Format  English 
See also french2.hil  german2.hil 

If using version 1, please refer to the Language File Format 1.

Overview

Hi HelpIndex may be configured to run with a different set of prompts, field names and status displays.

Usually you will use this facility to change the language of the user interface.
Try out Hi HelpIndex using French and German language files.

Here are the language files that we have available available.
French (Française) German (Deutsch) *
Version 1 french.hil german.hil
Version 2 french2.hil german2.hil
* Courtesy of Thomas Lackner et al.

Another possible use is to change the prompts for a particular application. For example, you could set up your site as an author database. Here's an example. The Query field name would remain the same, Keywords: would become Author and Pages: would become Information: or Web page:.

Note that Hi HelpIndex does not detect the desired language of the browsing user. When you set up Hi HelpIndex for your site on your server, the language file that you specify will be seen by all users of the site.

Note also that specifying a language file does not change the language of your help index file. If you specify a French language file then it would be a good idea to make the index file keywords in French as well. Heck... and your web pages.

Please also note that most of the error messages are still shown in English. While these could be made part of the language file, we thought that this would be unnecessary translation work.

You can specify a language file for each help index file that the user can select. See the usage instructions.

Using a Language File

By default, Hi HelpIndex uses a built-in English language file. Do not specify a language if you want to use this.

To use a different language file you must make the file in the appropriate format, store it on your server and reference it when running Hi HelpIndex.

You must set the language field in a indexN parameter to the URL of your language file, eg to use our French prompts use:
<PARAM NAME=index1 VALUE="site.hi,french2.hil">
If placed in a different directory to your class files, then amend the URL as necessary. Obviously make sure that it is accessible.

By convention, Hi HelpIndex language files have extension .hil, eg french2.hil.

Language File Format

A Hi HelpIndex language file has a series of character strings, one string per line. Lines usually end in CR and/or LF. No comments are permitted. Spaces at the end of lines are kept.

If the language file is shorter than specified here then the default English strings are used for the missing items.

The first line must be in 8 bit characters terminated by CR or LF. In general, subsequent lines need not be in 8 bit characters.

The first line specifies "format number" and "coding number" fields, separated by a semi-colon.

Hi HelpIndex version 2 uses Format 2 Coding 1. Hi HelpIndex version 1.7.1 uses Format 1 Coding 1.

Version 2.2+ of Hi HelpIndex supports different character encodings for language files. See the usage instructions for details of how to specify the character encoding.

In a different character encoding, use the same language file layout, ie CR or LF terminated lines.

This means that you can use Unicode or Unicode's UCS Transformation Format (UTF8) (RFC 2044). Here is the full list of supported encodings

Note carefully that Hi Lab does not create language files in different characters encodings so you must make your own.

If different strings are required for future versions of Hi HelpIndex, then a new format number will be allocated for the new arrangement.

Language File Format 2 Coding 1

The first line must contain "2;1" followed by CR and/or LF.

The "format number" specifies which arrangement of strings is expected. This format number is "1".

The "coding number" specifies how the strings have been encoded. Currently there is only one coding number (1) which specifies that the characters are stored in 8 bits with lines terminated by CR and/or LF. Blank lines are ignored.

The language file must have these strings in this order:

Built-in English Language File

The following text is in the English language file. Note that the line end character \n is included here to show that some lines have spaces at the end.
2;1\n
English\n

Look for: \n
Keywords: \n
Pages: \n

Contents\n
Index\n
Select\n
About\n

Exit\n
Display page\n

Select index (language)\n

About Hi HelpIndex...\n
Licencing information...\n

Reading help index\n
Index read\n
Click to see help index\n

Reading index file...\n
Sorry, cannot do lookup as index not read\n
Displaying page\n
Could not display page\n

HelpIndex    PHD