Add
...
new
...
text
...
to
...
a
...
JSP
Files:
- dspace-source/jsp/(JSP containing the text you want to change)
- dspace-source/config/language-packs/Messages.properties
...
- Open the relevant JSP and add a new
Code Block <fmt:message>
<fmt:message>
element where you want the new text to appear, making sure that the value of theCode Block key
attribute is unique. For example: <fmtCode Block <fmt:message
key="jsp.home.mynewkey"
/
>>
- Open Messages.properties and (for neatness) find the list of key values for the JSP you just changed. Add a new line corresponding to your new key.
Code Block jsp.home.mynewkey = Text of my new key
- Note: Messages.properties contains pairs of "keys" and "values". For example:
{{jsp.home.search1 = Search }}Code Block - Generally speaking, the "key" usually refers to the location of the JSP on which this text resides (e.g.
Code Block jsp.home.search1
is "search-related" text displayed in dspace-source/jsp/home.jsp) - Perform the steps in Rebuild + DSpace.
Notes:
- You can, of course, simply add the text directly to the JSP, but you will find it easier to maintain text in your DSpace installation if it is all kept in Messages.properties.
- Remember, when adding or modifying text in Messages.properties, be very careful that you have word-wrap turned off in your text editor!