This page is in the 'old' namespace, and was imported from our previous wiki. We recommend checking for more up-to-date information using the search box.

Customizing Greenstone3 Collections

Adding collection-specific service text strings

Text strings for services etc are defined in Java properties files. These live in web/WEB-INF/classes. Each class may have its own file, otherwise it will use a super class's file. For example, on an MGPP search page, the text string in the submit button "Search" is defined by the key TextQuery.submit. The MGPP TextQuery service is defined by the GS2MGPPSearch class. Greenstone will first look for a properties file called If the key is not found here, it will look at all the super classes properties files. At the time of writing, these are: AbstractGS2FieldSearch, AbstractGS2TextSearch, AbstractTextSearch, AbstractSearch.

Within each class file search, Java's resource bundle loading will apply, trying to load current language first, then default.

For example, say the default language is English (en) and the current language is Maori (mi). To find the TextQuery.submit string, we ask Java to load GS2MGPPSearch resource bundle. Java will look for, then, then If the key is found, then good. Otherwise we will ask to load up the AbstractGS2FieldSearch resource bundle, and try all languages there. So, will be used in preference to

To make collection specific text strings: You need to make a copy of the most specific file(s) - in this case (Or whichever language version(s) you are changing). Add these into your collection's resources folder (greenstone3/web/sites/localsite/collect/collname/resources). Modify the ones you want to change. Note, you need to define all strings from the original, as if Greenstone finds eg in the collection, it won't load up from the default area.