How to add another language in the OPAC for testing and debugging
- Article Type: General
- Product: Aleph
- Product Version: 20
Desired Outcome Goal:
* Add another language in the OPAC for testing and debugging
Procedure:
Most customers experienced the following: They report an OPAC problem to our support team, and then they are told that they should try it in the standard environment. Now the problem is that the html pages are heavily customized and reverting to the standard is not possible in an easy way.
Of course it is possible to use the OPAC directory in the A-tree with a MAB or USM environment but most desirable would be to have an additional
OPAC environment that mirrors the standard OPAC pages but enables you to search your own database.
The solution is to add a new virtual language, called "exl" in example below. This is not a language in the literal meaning, but another OPAC that differs from your OPAC in the fact that it contains unlocalized pages only.
It is recommended to use English language and implement the environment in your test system first.
The EXL environment does not interfer with your normal workflow.
In the case of a problem you may point out to the support team, that the problem exists in the standard environment as well.
In the following example the additional environment is called EXL, and it is copied from the English files. The path names are valid for Aleph 20
Do the following steps:
1. Add the code "EXL" to $alephe_tab/allowed_languages.
2. Create directories for the OPAC, the OPAC icons and the error messages in the EXL environment:
mkdir $alephe_root/www_f_exl
mkdir $alephe_root/www_f_exl/icon
mkdir $aleph_root/error_exl
3. Copy the OPAC screens, OPAC icons and error messages from the a-tree to your new EXL environment:
cd $alephe_root
cp -pR $aleph_dev/alephe/www_f_eng/* www_f_exl/
cd $aleph_root
cp -pR $aleph_dev/aleph/error_eng/* error_exl
4. In the OPAC files option-lng and option-lng-session add an option to switch from the English (or other) interface to the EXL environment.
Note: If you do these steps on your production server, you would not want to provide this new language to your customers; in this case omit this step; there is a way to change the language by manipulating the URL
in the browser.
5. Define the new language in the Apache definitions:
cd $alephe_root/apache/htdocs/$alephe_root
mkdir www_f_exl
cd $alephe_root/apache/htdocs/$alephe_root/www_f_exl
ln -s $alephe_root/www_f_exl/icon icon
6. Copy English language tables to the new exl code. The following script would do this. We assume that your library code starts with XYZ
(so XYZ01 is the BIB library, XYZ50 your ADM library etc):
set crd = `pwd`
foreach directory ($alephe_tab $xyz00_dev/xyz00/tab $xyz01_dev/xyz01/tab
$xyz10_dev/xyz10/tab $xyz40_dev/xyz40/tab $xyz30_dev/xyz30/tab
$xyz50_dev/xyz50/tab $xyz60_dev/xyz60/tab)
cd $directory
foreach f (*.eng)
set new_file = `echo $f:r.exl`
if (! -f $new_file) then
cp -p $f $new_file
endif
end
end
cd $crd
7. Add the new language to your path_convert files in xyz01/tab, xyz50/tab and xyz60/tab.
The EXL environment is now ready. You may enter it by changing the language in the options, or by adding "&CON_LNG=EXL" to the URL in your
browser (for example http://server:port/F?func=find-b-0&CON_LNG=EXL).
Category: Web OPAC (500)
Subject: Language (500)
- Article last edited: 10/8/2013