I'm not in too much of a hurry for a solution so I'm happy to wait for a
patch to get into Struts. A couple of questions, though;

1) Will the patch support all the attributes that are in the bean:message
tag? The argX attributes would be particularly useful to me.

2) Are there any plans to add support for the id, class and title common
attributes to all the html tags? If so the title attribute should also
support i18n and applies to many more elements than alt does.  

Thanks,

Howard

> -----Original Message-----
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: 15 February 2001 20:03
> To: [EMAIL PROTECTED]
> Subject: Re: Internationalised 'alt' text
> 
> 
> Bern McCarty wrote:
> 
> > What about a custom JSP tag designed to replace the use of 
> html:img tags.
> > The custom tag could produce a correct html:img tag as it's 
> output, complete
> > with localized alt text.
> >
> 
> A patch to do this kind of thing was submitted recently -- 
> it's on my queue of
> things to look at.
> 
> Craig
> 
> 
> >
> > -----Original Message-----
> > From: Howard Moore [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, February 15, 2001 1:21 PM
> > To: [EMAIL PROTECTED]
> > Subject: Internationalised 'alt' text
> >
> > Can anybody suggest how I can add internationalised alt text to the
> > <html:img> tag?
> >
> > If it were legal I would like to do something like the following;
> >
> > <html:img src="someImage.png" alt="<bean:message
> > key='someImage.alt.text'/>"/>
> >
> > but you can't nest tags like this.
> >
> > If not does anybody think it would be useful to add an optional 'id'
> > attribute to the <bean:message> tag which, if set, causes 
> the translated
> > message to be stored in a page context bean with the given 
> name rather than
> > being written out? This would allow me to write something like;
> >
> > <bean:message id="altTxt" key="someImage.alt.text"/>
> > <html:img src="someImage.png" alt="<%= altTxt %>"/>
> >
> > It would also allow translated strings to be cached in the 
> page if they are
> > going to be used repeatedly (inside a <logic:iterate> tag, 
> for example).
> > This may improve performance considerably.
> >
> > Any comments?
> >
> > -------------------------------------------
> > Howard Moore
> > Senior Software Engineer
> > Datapulse CTI
> > Tel : +44 (0)1491 418000
> > Fax : +44 (0)1491 411459
> > E-mail: [EMAIL PROTECTED]
> 

Reply via email to