[prev in list] [next in list] [prev in thread] [next in thread] 

List:       taglibs-user
Subject:    parameterize the locale through a beans' property
From:       kristian meier <km () jentro ! com>
Date:       2002-05-24 7:53:13
[Download RAW message or body]

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:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic