Koha How-To

Koha Question of the Week: How do I Customize the Language dropdown in the OPAC?

Each Friday, we will bring you a new Koha Question of the Week. We will select real questions that we receive and share the answers with you!

Question: How do I Customize the Language dropdown in the OPAC?

For libraries with a collection of material written in different languages, there is a specific dropdown in the Advanced Search on the OPAC that will allow your patrons to search by the language of the material. This dropdown is very long and not helpful to patrons if your library does not actually have material written in all the languages.

Answer: Yes! There is a way to customize this drop-down to only include the languages your collection has.

Here is an example of what Koha by default will show in the drop-down in the OPAC under language:

System Preferences

On your Koha Staff Client, there is a global system preference called Advancedsearchlanguages. In this system preference, the languages available in your library can be entered and separated by a pipe delimiter. Here is the link to the list of languages and the abbreviated version to use:

http://www.loc.gov/standards/iso639-2/php/code_list.php

For example, if your library had material in Spanish, French, and Russian, the system preference would be entered like this :

spa|fre|rus

Once your system preferences are saved and updated, the patron can use the advanced search feature in the OPAC and only see the languages your library has.

Notes: Koha will look at the 008 fields in the item’s marc record to find the language. For more information see the Library of Congress website.

Report

Here is a report that can be used to find out what languages your collection includes:

SELECT Substring(ExtractValue(metadata,'//controlfield[@tag=008]'),36,3) AS LANG, count(biblionumber) AS BIBS
FROM biblio_metadata
GROUP BY lang
ORDER BY bibs DESC

This will give the code of the language and the number of titles your library has for each language. Here is an example of what the results of the report will look like: