I'd suggest resolving this type of language choice in the Action. For example, there could be one product bean that is populated with whatever language is preferred by the client. The page could then just write whatever has been placed into the bean.

HTH, Ted.

Tsang, F (Fred) wrote:
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]





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



Reply via email to