Kishan_KP
Kishan_KP

Reputation: 4518

updating JSTL Locale dynamically irrespective of browser locale setting

I am developing web app using spring mvc frame work, in one of my jsp page i have <fmt:formatNumber> JSTL formatting tag. Usally this formatting tag will take locale information from client's browser locale setting. But i want to use specific locale not from browser locale setting. How can i do it.?

Upvotes: 2

Views: 386

Answers (1)

Haim Raman
Haim Raman

Reputation: 12043

Just place

<fmt:setLocale value="Your_Local"/>   

before your

<fmt:formatNumber>

and the switch back to browser locale

<fmt:setLocale value="${request.getLocale}"/>

Upvotes: 3

Related Questions