en:user_advanced:gs3_displayitems
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:user_advanced:gs3_displayitems [2018/12/10 00:51] – kjdon | en:user_advanced:gs3_displayitems [2023/12/21 07:40] (current) – [Display Item format] kjdon | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | |||
+ | |||
+ | |||
====== Display Items in Greenstone 3====== | ====== Display Items in Greenstone 3====== | ||
Line 12: | Line 15: | ||
Display items can be specified in several ways: | Display items can be specified in several ways: | ||
- | - Straight language dependent text: < | + | - Straight language dependent text: < |
- | - Dictionary lookup: < | + | - Dictionary lookup: < |
- | The main dictionaries | ||
- | =====Search page customisation ===== | ||
Note, main dictionaries are found in web/ | Note, main dictionaries are found in web/ | ||
+ | |||
+ | |||
+ | =====Customising the search fields ===== | ||
==== Levels==== | ==== Levels==== | ||
Line 24: | Line 28: | ||
< | < | ||
- | This will be displayed using level.section | + | By default, the text for this will come from level.section |
+ | We can customise it, e.g. | ||
< | < | ||
<level name=" | <level name=" | ||
Line 34: | Line 38: | ||
</ | </ | ||
- | For english, the lang=en displayItem will be used, as it matches the current | + | For english, the lang=en displayItem will be used, as it matches the current |
For languages where there is not a specific displayItem, | For languages where there is not a specific displayItem, | ||
Line 62: | Line 66: | ||
DisplayItems can be used here too, in a similar way to the indexes and levels. | DisplayItems can be used here too, in a similar way to the indexes and levels. | ||
- | ==== Dictionary Customization | + | ===== Understanding the Dictionaries ===== |
- | To get language specific strings in Java we use ResourceBundle dictionaries. If asked for a key from a specific dictionary in a specific language, Java will load the dictionary and look up the key. It has a chain or languages it tries. The specified language, a family related language (I think) , the default language. | + | To get language specific strings in Java we use ResourceBundle dictionaries. If asked for a key from a specific dictionary in a specific language, Java will load the dictionary and look up the key. It has a chain of languages it tries. The specified language, a family related language (I think), the default language. |
We use a custom classloader to find dictionary files (util/ | We use a custom classloader to find dictionary files (util/ | ||
Line 84: | Line 88: | ||
ServiceRack.properties: | ServiceRack.properties: | ||
ServiceRack.properties: | ServiceRack.properties: | ||
- | |||
en/user_advanced/gs3_displayitems.1544403096.txt.gz · Last modified: 2018/12/10 00:51 by kjdon