i just discovered 'displaytag' and am pretty excited... it provides lots of functionality for free that we previously had to code in eg. sorting, paging. however, since our application is multilingual (english and german), we need to be able to display column names in both languages. previously, we rendered the column names using JSTL tags:
<fmt:message key="..." bundle="${lang}"/>.
how can i do this with displaytag?
thanks,
sharath
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2004-06-10
Hi,
if you're using Struts with Displaytag, you could make use of the <bean:define> tag calling a <bean:message> from an ApplicationResources.properties file :
hello,
i just discovered 'displaytag' and am pretty excited... it provides lots of functionality for free that we previously had to code in eg. sorting, paging. however, since our application is multilingual (english and german), we need to be able to display column names in both languages. previously, we rendered the column names using JSTL tags:
<fmt:message key="..." bundle="${lang}"/>.
how can i do this with displaytag?
thanks,
sharath
Hi,
if you're using Struts with Displaytag, you could make use of the <bean:define> tag calling a <bean:message> from an ApplicationResources.properties file :
<bean:define id="filenameHeader"><bean:message key="label.filename"/></bean:define>
<bean:define id="sizeHeader"><bean:message key="label.size"/></bean:define>
<display:table name="requestScope.myList">
<display:column property="filenamer" title="<%=filenameHeader%>" />
<display:column property="size" title="<%=sizeHeader%>" />
<display:column property="link" title="" />
</display:table>
is there not an easier solution to use columns title defined as key in applicationResources.properties
I saw that there is a titleKey attribute but i don't know how can i use it (or attribute title) with the key name defined in the file.properties
Thanks for all
It's in the documentation for RC2.
http://displaytag.sourceforge.net/i18n.html