How about this: <!-- MyResources would be replaced with whatever class name you used in the application init-param you setup for the ActionServlet --> <jsp:useBean id="resouces" class="MyResources" /> <html:img src="someImage.png" alt='<%= resources.getString("someImage.alt.text") %>'/> Craig T. Peter Alfors wrote: > scratch that. You would need to have a bean that had access to the messages. > > Peter Alfors wrote: > > > I think that <bean:define> does what you want. > > > > <bean:define id="altTxt" property="someImage.alt.text"/> > > <html:img src="someImage.png" alt="<%= altTxt %>"/> > > > > HTH, > > Pete > > > > Howard Moore wrote: > > > > > 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] -- I've been trying to change the world for years, but they just won't give me the source code....
begin:vcard n:Tataryn;Craig tel;home:952-884-6752 tel;work:952-842-5576 x-mozilla-html:TRUE url:http://www.computer-programmer.org org:Compuware;Professional Division adr:;;3600 West 80th St. Suite 400;Bloomington;MN;55431;United States of America version:2.1 email;internet:[EMAIL PROTECTED] title:Senior Staff Analyst fn:Craig Tataryn end:vcard