You can also setup the same image files and resource file entries, and use a
tag like this (including an internationalized ALT value):

<html:img pageKey="header.image" altKey="header.image.alt" border="0" />

Note that the header.image value should be context-relative. Struts will add
the context path and then write it out as the img src attribute. With
altKey, Struts will lookup the internationalized message and write it out as
the img alt attribute.

Struts make this kind of internationalization so easy on us; it's great!

-Max

----- Original Message -----
From: "Emmanuel Bridonneau" <[EMAIL PROTECTED]>
To: "Todd Pierce" <[EMAIL PROTECTED]>; "'Struts Users Mailing List'
(E-mail)" <[EMAIL PROTECTED]>
Sent: Thursday, April 11, 2002 6:05 PM
Subject: RE: how to i18n images?


Thanks I appreciate your input. I was hoping more or less to get
pointers to some tools that allows me to apply a transparent image to a
text that is localized. The designer don't have to spend that much time
in designing 100's of pic


-----Original Message-----
From: Todd Pierce [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 11, 2002 5:05 PM
To: Emmanuel Bridonneau
Cc: Struts Users Mailing List
Subject: RE: how to i18n images?


Here's what I did to internationalise a logo image for english french
and
spanish versions:

1 Created/acquired images logo.gif, logo_fr.gif, logo_es.gif, etc

2 In the JSP -
<img src="<bean:message key="header.image" />" border="0">

3 In the default (English) properties file:
header.image=<path>/image.gif
4 In the fr properties file:
header.image=<path>/image_fr.gif
5 In the es properties file
header.image=<path>/image_es.gif

-----Original Message-----
From: Emmanuel Bridonneau [mailto:[EMAIL PROTECTED]]
Sent: Friday, 12 April 2002 7:03
To: 'Struts Users Mailing List' (E-mail)
Subject: how to i18n images?


Hi all,
3 questions for you struts guru.
I believe struts requires  that we se struts tags within a form to
figure out access to the correct bean. I haven't seen any reference to
an input of type image as a strut tags.
- Can I then use a pure html construct like
<input type="image" src="../images/btn-save.gif" />
in my forms and that'll be the only non struts tag?

- But then how does struts handle I18N image button?
- What are the known approaches used to generate locale sensitive
images?

Thanks for your input.

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to