Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-1232

Add i18n localisation example to demosuite

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • 2.10.00
    • 2.10.02
    • None
    • None

    Description

      Thx for this info Mathijs den Burger

      1. add to your web.xml:

      <!-- Define the basename for a resource bundle for I18N -->
      <context-param>
      <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
      <param-value>messages</param-value>
      </context-param>

      2. put property files starting with 'messages' in src/main/resources, i.e. message_en_US.properties and messages_nl_NL.properties. Same keys, localized values.

      3. use a localized value for a key 'mykey' in your JSP via the fmt:message tag:

      <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
      <fmt:message key="mykey"/>

      Attachments

        Activity

          People

            aschrijvers Ard Schrijvers
            aschrijvers Ard Schrijvers
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: