JSTL fmt:setLocale problem

K

klikic

Hi.
I have a problem setting locale using fmt:setLocale.
I put <fmt:setLocale value="${command.lang}" scope="session"/> in
header, and
<fmt:message key='text.toWriteText'/> in body.
"command.lang" is set when i type in my HTTP request "?lang=locale".
"command.lang" is set properly.

Problem:
My browser has "en" and "hr" language set. "hr" language is first in
order.
When I send request "?lang=en" i get messages from "hr" locale.
When I set "en" as first in order in my browser, and I send request
"?lang=hr" I get message in "en" local.
My conclusion is that fmt:setLocale doesn't set locale variable.
What is the problem, what did I miss?

Thanx.
Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top