tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre Delisle <pierre.deli...@sun.com>
Subject Re: problems with fmt:setLocale
Date Fri, 03 Jan 2003 20:10:05 GMT
Pablo, Paul,

There were a few bugs related to tag-reuse and the formatting
tags. I'd suggest using the nightly build and see if the problems
persist. 

Please do let us know whatever the outcome is; we really want
to fix these problems.

Thanks,

    -- Pierre

Paul Campbell wrote:
> 
> Hola Pablo,
> I am not certain that I understand completly.
> 
> This is what I do to take the language that the browser
> has and use that for the user.
> 
> <c:if test="${param.language == 'en'}">
>     <fmt:setLocale value="en" scope="page" />
> </c:if>
> <c:if test="${param.language == 'es'}">
>     <fmt:setLocale value="es" scope="page" />
> </c:if>
> <fmt:setBundle basename="pages" var="pagesBundle" />
> <fmt:setBundle basename="sitetext" scope="page" />
> 
> I had one problem.
> I needed to set enablePooling=false in conf/web.xml
> for the jsp servlet.
> When I took the default, the lang first used by the
> browser was the only language it would display.
> 
> Let me know if you still have problems or if I misunderstood
> your question.
> 
> At 09:26 PM 12/21/2002 +0100, you wrote:
> >Hi all:
> >
> >I'm trying to i18n a web app using jstl and jakarta tomcat 4.1.12.
> >
> >I'm trying to keep the same language for all a user session,
> >existing the possibility that the user change the language calling to
> >index.jsp?lang=es.
> >
> >
> >
> >This is the index.jsp file (called with index.jsp?lang=en to change to
> >English language...
> >-------------
> ><%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
> ><%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
> >
> >..
> >...
> ><c:set var="locale" value="${param.lang}" />
> ><fmt:setLocale value="${locale}" scope="session"/>
> >
> ><fmt:setBundle basename="com.pablo.mybundle" scope="session"/>
> >
> ><fmt:message key="configActual" />
> >..
> >..
> >
> >
> >
> >
> >
> >The rest of the files are supossed to share the Locale and Bundle, so
> >jsp's might look like this:
> >------------
> ><%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
> >..
> ><fmt:message key="myKey" />
> >..
> >
> >
> >The problem is that the language doesn't change. It just changes the first
> >time is called:
> >        i.e: If the first call is index.jsp?lang=fr, the language will be french
> >for all the time the session lasts.
> >
> >I've take a look at previous posts and changed the conf/web.xml
> >enablePooling to false, but nothings change.
> >
> >Have any of you heard or experienced similar problems?
> >
> >Best regards, and Merry Christmas!
> >
> >PaBLo!
> >
> >
> >
> >--
> >To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
> >For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message