I've got a similar problem. You could write a scriptlet function that appended the correct languageCode onto your "default" property name and use the result of that string in the bean:write tag.
Please let me know if you find a more elegant way around this. > -----Original Message----- > From: Tsang, F (Fred) [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 10, 2003 10:01 AM > To: [EMAIL PROTECTED] > Subject: logic tag using locale > > > All, > > I'm trying to do a bean:write based on the user's current > language. Before you ask, this isn't just > internationalization using the properties files. I'm > displaying item attributes stored in a database, where there > are german and english descriptions. I know I can set a bean > in my action and access the tag like so: > > request.setAttribute("currentLanguage", > getLocale(request).getLanguage()); > > <logic:equal name="currentLanguage" value="en"> > <bean:write name="product" property="specialFeatures" > ignore="true" /> </logic:equal> <logic:equal > name="currentLanguage" value="de"> > <bean:write name="product" property="specialFeaturesDE" > ignore="true" /> </logic:equal> > > is there a bean for locale by default which removes the need > to set the currentLanguage bean I have above? something like: > > <logic:equal name="userlocale" value="en"> > <bean:write name="product" property="specialFeatures" > ignore="true" /> </logic:equal> > > Are there any special beans which have default names? Any > help is appreciated. > > cheers, > Fred > > > > _____________________________________________________________ > > This email (including any attachments to it) is confidential, > legally privileged, subject to copyright and is sent for the > personal attention of the intended recipient only. If you > have received this email in error, please advise us > immediately and delete it. You are notified that disclosing, > copying, distributing or taking any action in reliance on the > contents of this information is strictly prohibited. Although > we have taken reasonable precautions to ensure no viruses are > present in this email, we cannot accept responsibility for > any loss or damage arising from the viruses in this email or > attachments. We exclude any liability for the content of this > email, or for the consequences of any actions taken on the > basis of the information provided in this email or its > attachments, unless that information is subsequently > confirmed in writing. If this email contains an offer, that > should be considered as an invitation to treat. > _____________________________________________________________ > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]