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 Bradley Schatz <br...@greystate.com> on 2002/08/06 15:57:22 UTC
and session based locales
Hi,
I am currently using the Jakarta STL implementation in a Model 2
servlet/jsp application.
My locale choice needs to be decoupled from the default, so I am doing
this in the controller servlet and setting a session based locale using:
Config.set(session, Config.FMT_LOCALE, loc);
this works perfectly with PropertyResouceBundle based <fmt:bundle>, and
<fmt:message> tags in a given page. However, in the same page where this
works, the <formatDate> tag only seems to output english, rather than
the german i have configured the locale to. The tag i am using is below
<fmt:formatDate value="${thedate}" type="both" dateStyle="LONG"
timeStyle="LONG" />
Any suggestions on what i could do to fix this ?
thanks,
Bradley
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: and session based locales
Posted by Shawn Bayern <ba...@essentially.net>.
On 6 Aug 2002, Bradley Schatz wrote:
> Thanks Shawn,
>
> Indeed the problem is in my understanding of German and lack of testing
> rather than a fault in the taglib.
Great! By the way, this part of my response made me laugh as I was
looking it over:
> > Hi Bradley. It seems to work for me. Is it possible that the German
> > locale just doesn't have the LONG/LONG date format that you expect? For
> > instance, I get
> >
> > 6. August 2002 10:09:49 EDT
> >
> > for Locale.GERMAN, as contrasted with
> >
> > August 6, 2002 10:11:16 AM EDT
You can see it took precisely 1.45 minutes for me to switch the locale and
reload the page. Seems like an awfully long time. :-)
--
Shawn Bayern
"JSTL in Action" http://www.jstlbook.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: and session based locales
Posted by Bradley Schatz <br...@greystate.com>.
Thanks Shawn,
Indeed the problem is in my understanding of German and lack of testing
rather than a fault in the taglib.
Thanks again,
bradley
On Tue, 2002-08-06 at 15:13, Shawn Bayern wrote:
> On 6 Aug 2002, Bradley Schatz wrote:
>
> > Config.set(session, Config.FMT_LOCALE, loc);
> >
> > this works perfectly with PropertyResouceBundle based <fmt:bundle>, and
> > <fmt:message> tags in a given page. However, in the same page where this
> > works, the <formatDate> tag only seems to output english, rather than
> > the german i have configured the locale to. The tag i am using is below
> >
> > <fmt:formatDate value="${thedate}" type="both" dateStyle="LONG"
> > timeStyle="LONG" />
> >
> > Any suggestions on what i could do to fix this ?
>
> Hi Bradley. It seems to work for me. Is it possible that the German
> locale just doesn't have the LONG/LONG date format that you expect? For
> instance, I get
>
> 6. August 2002 10:09:49 EDT
>
> for Locale.GERMAN, as contrasted with
>
> August 6, 2002 10:11:16 AM EDT
>
> for my default (US English) locale.
>
> The eighth month in German is indeed written "August," as in English.
> Try it with October ("Oktober" in German) just to be sure.
>
> --
> Shawn Bayern
> "JSTL in Action" http://www.jstlbook.com
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: and session based locales
Posted by Shawn Bayern <ba...@essentially.net>.
On 6 Aug 2002, Bradley Schatz wrote:
> Config.set(session, Config.FMT_LOCALE, loc);
>
> this works perfectly with PropertyResouceBundle based <fmt:bundle>, and
> <fmt:message> tags in a given page. However, in the same page where this
> works, the <formatDate> tag only seems to output english, rather than
> the german i have configured the locale to. The tag i am using is below
>
> <fmt:formatDate value="${thedate}" type="both" dateStyle="LONG"
> timeStyle="LONG" />
>
> Any suggestions on what i could do to fix this ?
Hi Bradley. It seems to work for me. Is it possible that the German
locale just doesn't have the LONG/LONG date format that you expect? For
instance, I get
6. August 2002 10:09:49 EDT
for Locale.GERMAN, as contrasted with
August 6, 2002 10:11:16 AM EDT
for my default (US English) locale.
The eighth month in German is indeed written "August," as in English.
Try it with October ("Oktober" in German) just to be sure.
--
Shawn Bayern
"JSTL in Action" http://www.jstlbook.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>