User manual
Chapter 12
This feature requires the following changes:
Modify the CSS file to position the transliteration control
Modify the search box on the masthead to accept input in the source
language
Add the language selector drop -down list to the right of the search box
Include a Google- provided JavaScript file; the transliteration is performed
by this file
Add a new system preference to control the availability of the tool
Creating a development branch
Lets first create a development branch in which to work by creating a copy
of the master branch:
Koha @linux: /home /koha /kohaclone # git checkout -b mydevel master
This command creates a copy of the master branch, and switches to using this
new branch.
Making CSS changes
To position the control via CSS, we edit the
opac . css
file in the koha- tmpl /opac-
tmpl /prog /en /css folder:
koha@linux:/home/koha/kohaclone # vi koha-tmpl/opac-tmpl/prog/en/CSS/
opac.css
We add this block for the transliteration control to the CSS file:
#translControl{
float : left;
padding -left
: .4em;
Creating a new JavaScript file
We create the new Google- provided JavaScript file in the folder koha -tmpl /opac-
tmpl /prog /en /j s.
Open an empty new file using the
vi
command:
koha@linux:/home/koha/kohaclone # vi koha-tmpl/opac-tmpl/prog/en/js/
googleindictransliteration.js
[ 235 ]