You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Oliver Wulff <ol...@zurich.ch> on 2003/12/14 18:49:19 UTC

JSTL, local, fmt:get




I wrote an Action class which changes the local according the language the
user has choosen from a listbox:
setLocale(request, Locale.ENGLISH);

Now, I migrated the struts tag library 'bean' to JSTL 'fmt'. Unfortunately,
changing the language doesn't affect the fmt tags:
snippet of my jsp:
<fmt:setBundle
basename="com.zurich.chz.omnibus.berechtigung.ApplicationResources"/>
<fmt:message key="search.title"/>

What am I doing wrong?






******************* BITTE BEACHTEN *******************
Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet
möglicherweise vertrauliche oder gesetzlich geschützte Daten oder
Informationen. Zum Empfang derselben ist (sind) ausschliesslich die
genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht
irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter
Ausschluss jeder Reproduktion zu zerstören und die absendende Person
umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: JSTL, local, fmt:get

Posted by Kris Schneider <kr...@dotech.com>.
Spelling fix ;-):

import javax.servlet.jsp.jstl.core.Config;
...
Locale locale = Locale.ENGLISH;
setLocale(request, locale);
HttpSession session = request.getSession(true);
Config.set(session, Config.FMT_LOCALE, locale);

Quoting Kris Schneider <kr...@dotech.com>:

> See if this helps any:
> 
> import javax.servlet.jsp.jstl.core.Config;
> ...
> Local locale = Locale.ENGLISH;
> setLocale(request, locale);
> HttpSession session = request.getSession(true);
> Config.set(session, Config.FMT_LOCALE, locale);
> 
> Quoting Oliver Wulff <ol...@zurich.ch>:
> 
> > 
> > 
> > 
> > 
> > I wrote an Action class which changes the local according the language
> the
> > user has choosen from a listbox:
> > setLocale(request, Locale.ENGLISH);
> > 
> > Now, I migrated the struts tag library 'bean' to JSTL 'fmt'.
> Unfortunately,
> > changing the language doesn't affect the fmt tags:
> > snippet of my jsp:
> > <fmt:setBundle
> > basename="com.zurich.chz.omnibus.berechtigung.ApplicationResources"/>
> > <fmt:message key="search.title"/>
> > 
> > What am I doing wrong?
> 
> -- 
> Kris Schneider <ma...@dotech.com>
> D.O.Tech       <http://www.dotech.com/>

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: JSTL, local, fmt:get

Posted by Kris Schneider <kr...@dotech.com>.
See if this helps any:

import javax.servlet.jsp.jstl.core.Config;
...
Local locale = Locale.ENGLISH;
setLocale(request, locale);
HttpSession session = request.getSession(true);
Config.set(session, Config.FMT_LOCALE, locale);

Quoting Oliver Wulff <ol...@zurich.ch>:

> 
> 
> 
> 
> I wrote an Action class which changes the local according the language the
> user has choosen from a listbox:
> setLocale(request, Locale.ENGLISH);
> 
> Now, I migrated the struts tag library 'bean' to JSTL 'fmt'. Unfortunately,
> changing the language doesn't affect the fmt tags:
> snippet of my jsp:
> <fmt:setBundle
> basename="com.zurich.chz.omnibus.berechtigung.ApplicationResources"/>
> <fmt:message key="search.title"/>
> 
> What am I doing wrong?

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org