User manual
Customizing Koha Software
And add the contents of the transliteration file to the file:
// Load the Google Transliteration API
google.load( "elements ",
"1 ",
{
packages: "transliteration"
} ) ;
function onLoad()
var options =
Loading the Transliteration JavaScript file
Next, we add a block to load the transliteration JavaScript file. We add this block
to the
doc- head -close. inc
file in the
koha - tmpl /opac -tmpl /prog /en /includes
folder. The
doc- head -close .inc
file is included in all OPAC pages, so we can be
sure that our new JavaScript will be loaded in all pages.
koha@linux: /home /koha /kohaclone # vi koha - tmpl /opac - tmpl /prog /en/
includes /doc- head -close. inc
We add this block to the include file:
<! -- TMPL IF NAME = "GooglelndicTransliteration" -->
<script type = "text /JavaScript" src = "http: / /www.google.com/
jsapi " > < /script>
<script type = "text /JavaScript" language = "JavaScript" src = " <!-
- TMPL_VAR NAME= "themelang" -->/ js/ googleindictransliteration .js " > </
script>
<! -- /TMPL IF -->
Note the use of this if condition in the block above:
<! -- TMPL_IF NAME = "GooglelndicTransliteration" -->
This loads the Transliteration JavaScript only if a system preference
GooglelndicTransliteration is set to On.
Creating a system preference
Next, we create a system preference that will be used to control whether the
transliteration tool will be displayed or not. The system preference once installed
will look like this:
[ 236 ]