Details
-
Task
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
2.10.00
-
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"/>