Life sucks right?? 😉 But as long as it is still there, here’s “one for the road”! 😀 So, read on!
Turning on Google Transliteration
It all starts with setting
GoogleIndicTransliteration system preference to “Show” from the default of “Don’t show”.
For users from India, a country with 22 official language at the last count, that default list is woefully too little, too less. The good news is that Google’s Transliteration API supports several dozens of languages. Which ones? Well you need to dig around LanguageCode and SupportedDestinationLanguages enumerations in the documentation.
Show me the money!
The code to support the function is loaded via
googleindictransliteration.js file that resides under
/usr/share/koha/opac/htdocs/opac-tmpl/bootstrap/js/ on a Debian package based installation.
The screen grab below shows exactly that changes we needed to make in order to show on Hindi and Bengali as the list of languages, *and* with Bengali as default language option on the select drop-down.
So how did I know that I needed to use “
bn” for Bengali? Well, that LanguageCode enum list I’ve linked to above. Simple really!
One more fact about this tip that will bug a few
Change(s) to the LanguagesCode enum like this within the
googleindictransliteration.js file would cause *all* instances on a multi-tenanted Koha installation to display the same list of languages. So, if you need different sets of languages lists in different OPACs, you are probably out of luck.