Alternate Languages Forms, files and functions Web OptionsPrint this Page
Web Options
are used to control many areas of your WebPAC. Where specified in Web Option descriptions, you can vary settings by language. To vary by language append the three letter language code to the option name. If an option for the current language does not appear in the Web Options file, WebPAC uses the default Web Option setting (i.e., the option without a language extension). This means that you have to have all language dependent Web Options set for each language, or your WebPAC will not behave as expected.

From the viewpoint of setting up your WebPAC for alternate languages you need to consider:

  • Web Options that control the default language of the WebPAC and how to change language - discussed in
  • Web Options that contain textual parts or point to HTML or image files with language elements
  • Web Options that redirect users to other pages
Some examples of Web Options from the second category are TOPLOGO and SORT_BROWSE. They are used below as examples of how to customize by language.

TOPLOGO specifies an image, text or external HTML file to display on the top line of WebPAC screens. On customized forms it can be called by {toplogo}, on system generated pages it will appear automatically.

Example:
English version: TOPLOGO=@screens/toplogo.html

On English pages this may result in the following display:

Vietnamese version: TOPLOGO_VIE=@screens/toplogo_vie.html

On Vietnamese pages this may result in the following display:

The BOTLOGO Web Option works in the same way to define the image or text to display on the bottom line of WebPAC screens.

The SORT_BROWSE option controls the sort options offered to users during phrase index searches, and the labels associated with those sort options. On some customizable forms it can be called by a token. On system generated pages it appears automatically where appropriate.

English version:
SORT_BROWSE=C:Chronological|R:Reverse Chronological|N:Call
Number|T:Title|A:Author|M:Material Type|

Chinese version:

Note that you often have to use HTML coding for diacritics, while it sometimes works to simply type in the diacritic as is. You may have to exercise some trial and error to find out what works best.

So called BUT_ options are one of the Web Option types that control graphics. Unlike other options you do not need to vary the BUT_ options by language. Instead the variation is done by naming the corresponding gif files consistently:

startagain.gif - name of English START OVER button

startagain_spi.gif - name of corresponding Spanish button

The only Web Option you need is:
BUT_STARTOVER = /screens/startagain.gif

When a user is running the WebPAC in Spanish the server will look for a file named startagain_spi.gif. If there is no such file it will use the startagain.gif instead.

Note that the ICON_ options need to vary by language. Unlike BUT_ options they can contain textual parts instead of, or as a complement to, directions to a file.

Web Options that redirect users to other pages include:

The three startover options can all vary by language. You could for example have the following:
STARTOVER=/search
STARTOVER_CHT=/search*cht

When the session language is English the Start Over button will send the user to the English opacmenu.html, when the session language is Chinese the Chinese version of Start Over will send the user to the Chinese opacmenu_cht.html.

The TIMEOUT option cannot vary by language. However, the system will 'remember' the language and redirect the WebPAC to the [lang] version of the page set for TIMEOUT.

A typical setting of TIMEOUT is:

TIMEOUT= 300;URL=/search

After five minutes (300 seconds) of inactivity the screen will go back to /search = opacmenu.html. If the session language was Vietnamese before the timeout was triggered the screen will instead go back to /search*vie = opacmenu_vie.html.