Hi ,

Even i am facing the problem with the locale setting. I tried what ever you
mentioned but all in vain
if you have found any solution please help.




kschneid wrote:
> 
> Per the spec, make sure <fmt:setLocale> is placed at the beginning of the
> page,
> or at least before any other i18n-capable formatting actions. Can you try
> the
> following:
> 
> <%@ page contentType="text/plain"
> import="javax.servlet.jsp.jstl.core.Config"
> %>
> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"; %>
> 
> <fmt:setLocale value="pl_PL"/>
> 
> Config locale: <%= Config.find(pageContext, Config.FMT_LOCALE) %>
> Response locale: ${pageContext.response.locale}
> 
> <jsp:useBean id="date" class="java.util.Date"/>
> Date: <fmt:formatDate value="${date}" type="date" dateStyle="medium"/>
> 
> I get:
> 
> Config locale: pl_PL
> Response locale: pl_PL
> Date: 2007-06-28
> 
> If I remove <fmt:setLocale>, I get:
> 
> Config locale: null
> Response locale: en_US
> Date: Jun 28, 2007
> 
> So it seems to be working...
> 
> Quoting Java Programmer <[EMAIL PROTECTED]>:
> 
>> Hi,
>> I have problem with using fmt:formatDate and fmt:setLocale - I use:
>> 
>> <fmt:setLocale value="pl_PL" />
>> <fmt:formatDate value="${loggeduser.createDate}" type="date"
>> dateStyle="MEDIUM" />
>> 
>> But my browser sends en_EN locale as prefered, so I cannot get date
>> formated in pl_PL they are always formated with browser's en_EN one -
>> is there any way to change this behaviour eg. NOT to take browser
>> prefered locales and use application ones?
>> 
>> Best regards,
>> Adr
> 
> -- 
> Kris Schneider <mailto:[EMAIL PROTECTED]>
> D.O.Tech       <http://www.dotech.com/>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
:-(:-(:-(:-(:-(
-- 
View this message in context: 
http://www.nabble.com/fmt%3AformatDate-and-fmt%3AsetLocale-problem-tf3994397.html#a13491375
Sent from the Taglibs - User mailing list archive at Nabble.com.


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

Reply via email to