Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fix formatting, updates for 3.0
Panel

Contents

Table of Contents
outlinetrue
stylenone

Change page text

This page describes how to change text on a page of the JSPUI.

Files:

The location of the files you'll want to edit depend on which version of DSpace you are using, as the location of the primary JSP folder has changed in DSpace over the years.

  • DSpace 3.0 or above
    • Messages file: [dspace-source]/dspace-api/src/main/resources/Messages.properties
    • JSP folder : [dspace-source]/dspace-jspui/src/main/webapp/ (JSP containing the text you want to change)
  • DSpace 1.5.0 through 1.8.2
    • Messages file: [dspace-source]/dspace-api/src/main/resources/Messages.properties
    • JSP folder : [dspace-source
    /jsp
    • ]/dspace-jspui/dspace-jspui-webapp/src/main/webapp/ (JSP containing the text you want to change)
  • DSpace 1.4.2 and earlier versions
    • Messages file: [dspace-source]/config/language-packs/Messages.properties
    • JSP folder: [dspace-source]/jsp/ (JSP containing the text you want to change)

Instructions:

  1. Open Messages.properties and search for the text you wish to change.
    • Note: Messages.properties contains pairs of "keys" and "values". For example:

      <p class="Example">jsp

      Code Block
      jsp.home.search1 = Search
  2. Generally speaking, the "key" usually refers to the location of the JSP on which this text resides (e.g.

    Code Block

    jsp.home.

    search1

    search is "search-related" text displayed in

    dspace-source/jsp/

    home.jsp)

  3. If Messages.properties contains that text in more than one place, open the relevant JSP and find the

    Code Block

    key

    attribute of the appropriate

    Code Block
    &lt;fmt:message&gt;

    <fmt:message> element. For example:

    <p class="Example"><fmt

    Code Block
    <fmt:message key="jsp.home.search1" />
  4. Change the text (that corresponds to the key) in Messages.properties.
  5. Perform the steps in Rebuild DSpace.

Notes:

  1. When adding or modifying text in Messages.properties, be very careful that you have automatic word-wrap turned off in your text editor! The "key" and its corresponding "value" must always be on the same line within Messages.properties (e.g.) This is NOT a valid entry in Messages.properties:

    Code Block
    jsp.community-home.heading1 = This is a really long heading
    which actually gets wrapped automatically by my text editor
    so that it ends up on three separate lines. 

...