Jump to content
We've recently updated our Privacy Statement, available here ×

LOCALE setting problem


alauddinctgbd

Recommended Posts

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 month later...

swood wrote:

The default behavior is to use the locale of your browser. We are testing out a completely internationalized version of JI now, which will give you more control over locale and time zone setting.


Sherman
JasperSoft

 

Sherman,

 

I've recently started down the localization path myself and I've discovered that while Jasper Reports does use the passed locale parameter in several places, it doesn't look like it will be used whenever I have a "msg (...)" statement in a jrxml text field expression.

 

That shorthand statement translates into a call to MessageFormat.format () which, the javadoc states, uses getLocale(). Doesn't that use the JVM locale at that point?

 

Can you help clear up my confusion? Is this perhaps fixed in the version you mention?

 

Thanks in advance for any help you can provide.

 

-Dennis

Link to comment
Share on other sites

lucianc wrote:

The msg() method has been fixed to use the report locale in JasperReports 1.2.8. You could update the JR version in your application and see whether msg() works as expected.

HTH,
Lucian

 

Lucian,

 

Thank you for the information! I'm unpacking the latest version now. As soon as I posted the question a little voice inside said that I should have peaked at the latest source.

 

Thanks again.

Link to comment
Share on other sites

  • 2 years later...

helyair
Wrote:

My system:

  • JS 3.5
  • Windows Xp (Italian version)
  • Firefox (English)

I have uploaded in JS two bundle files: "reports_properties.properties" (with default english translation) and "reports_properties_it.properties".

If I log in JS with english locale (en) I see $R{...} on the reports translated to italian and not to english. Why?

I reply to myself:

I have understood what swood was saying: JS doesn't use "reports_properties.properties" like default bundle for languages without their property file, but it uses the default language of the browser (or of the OS?).

However you have to make a property file for every language which you want to suppport, in my case I have created also a "reports_properties_en.properties" file for english.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...