Well, the value you store in the actual field would have to be
"priority.low", "priority.normal", or "priority.hi" instead of "normal,
high, or low.  Then you can simply use the bean:message instead of
bean:write.  The bean:message tag will treat the property= as the "key" in
to the resource bundle.  Alternatively you can prepend "priority." to the
value of your data and then pass that to the message tag, as in:

<bean:define id="priority" name="bean" property="priority"/>
<bean:message name="<%="priority." + priority"/>

For example...

-------------
-AP_
See my profile at
http://www.myprofiles.com/member/view.do?profileId=128


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 26, 2002 5:21 AM
To: [EMAIL PROTECTED]
Subject: I18N question


Hi!

In my application I have an enumeration called priority containg values
"low", "normal" and "high". At one point of the application the user can
enter the priority using a selection list. Localizing here works fine like
this:

<html:select property="priority"><html:option value="low"
key="priority.low"/><html:option value="normal"
key="priority.normal"/><html:option value="high"
key="priority.high"/></html:select></td>

using a property file looking like this:

priority.low=Niedrig
priority.normal=Mittel
priority.high=Hoch

Like I said, this works perfectly well. But at another point of the
application
the choosen priority should be displayed.
A simple
<bean:write name="bean" property="priority"/>
would display the not localized values "low", "normal" or "high", but
ofcourse
I would like to have the localized strings "Niedrig", "Mittel", or "Hoch" to
be shown...

Any clues ?

thanks,

Gernot.



---------------------------------------------
Kabelsignal AG                        Webmail
http://www.kabelsignal.at



--
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