Month name in english - wrong locale

When i log in JasperServer, I choose the pt-BR locale (Brazilian Portuguese).
The application interface entirely in Portuguese with this action.
 
However, when I request a report, the date format on report view, is appearing with month names in English (January, February...), as shown below:
 
 
 
In the report, i use the Format function to display the date on MONTH / YEAR format:
<categoryExpression><![CDATA[ DATEFORMAT( $F{Mês},"MMMM/yy" ) ]]></categoryExpression>
How do I fix this problem? How i display the name of the month in Portuguese (Janeiro, Fevereiro, Março)?
diegoqueres's picture
Joined: Oct 19 2010 - 2:43am
Last seen: 3 years 6 months ago

2 Answers:

Language you choose before logging in is just for the JasperReports Server locale and is not for report locale. To get the locale correctly in reports, you have to set locale properly in your reports and in jvm. Something like below in set-env.bat
-Duser.language=pt -Duser.region=BR

hozawa's picture
170221
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 9 months ago

I put this on setenv.bat file, but didn't fix the problem:

set JAVA_HOME=C:\JASPER~1\JASPER~1.0\java

set JAVA_OPTS="%JAVA_OPTS%  -Duser.language=pt -Duser.region=BR -Duser.country=BR   "
diegoqueres's picture
Joined: Oct 19 2010 - 2:43am
Last seen: 3 years 6 months ago
Feedback