On Sep 25, 2008, at 6:50 PM, Mark H. Wood wrote:
> On Thu, Sep 25, 2008 at 03:53:36PM -0400, Mark H. Wood wrote:
>> o There was some quite reasonable objection to substituting static
>> data every time a given message is inserted into a page, and a
>
> I'm sorry, memory failed. The objection was to replacing the JSTL
> message catalog function with one peculiar to DSpace, which is also a
> reasonable objection.
Maybe an example of how to do it using MessageFormat and JSTL would
help get the point across...
Take...
Messages.properties:
jsp.home.search2 = Enter some text in the box below to search DSpace.
home.jsp
<p><label for="tquery"><fmt:message key="jsp.home.search2"/></label></p>
---------- replace it with ---------------------------
Messages.properties:
jsp.home.search2 = Enter some text in the box below to search {0}.
home.jsp:
<p><label for="tquery">
<fmt:message key="jsp.home.search2">
<fmt:param value='<%=ConfigurationManager.getProperty("dspace.name")
%>'/>
</fmt:message>
</label></p>
And no more "DSpace". Of course, this would need to be done across the
JSPUI for all cases. In Servlets that look up messages, you would use
the MessageFormat class. There is comparable mechanism in the Cocoon
i18n in the XMLUI.
-Mark
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel