You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by kristian meier <km...@jentro.com> on 2002/05/24 09:53:13 UTC

parameterize the locale through a beans' property

Hello,

I wanted to parameterize the locale for each request through a property 
of a bean, but the property is not propagated to the setLocale tag, so
the resources bundle is not found.

<i18n:setLocale value="<c:out value='${user.lang}'/>" scope="request"/>

<i18n:setBundle basename="com.jentro.Resources" var="locale" 
scope="request"/>

a workaround like the following does work, but it is sort of ugly

<c:choose>
  <c:when test="${users.user.lang == 'de'}">
    <i18n:setLocale value="de" scope="request"/>
  </c:when>
  <c:otherwise>
    <i18n:setLocale value="en" scope="request"/>
  </c:otherwise>
</c:choose>

do I have general misunderstanding of when and how to nest tags ?

best wishes
Kristian


-- 
-------------------------------------------------------------
Jentro AG
Kristian Meier, Software Development
-------------------------------------------------------------
Peter-Henlein-Strasse 28, 85540 Haar/Munich, Germany
Tel. +49 89 462 385 0 mailto:Kristian.Meier@jentro.com
Fax +49 89 462 385 29 http://www.jentro.com
-------------------------------------------------------------


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>