Community
Participate
Working Groups
Build Identifier: 20100617-1415 We have 2 resources : myresource_en.properties and myresource_fr.properties When generating the report, we set the locale as English : runTask.setLocale(ULocale.ENGLISH); All labels in the Master page got from myresource_en.properties and all labels in the Layout got from myresource_fr.properties We expect all labels must be in myresource_en.properties When we set the locale as French (runTask.setLocale(ULocale.FRENCH);), then all labels are correctly in French from myresource_fr.properties Reproducible: Always
Created attachment 185716 [details] My Report design
what's the locale of your machine?
(In reply to comment #2) > what's the locale of your machine? The locale of my machine is French
I can not reproduce this issue in the 2.6.0 release build. Simple java file and sample report is attached. Both labels in masterpage and report body were localized correctly.
Created attachment 189910 [details] simple java file
Created attachment 189911 [details] example report with resources
(In reply to comment #4) > I can not reproduce this issue in the 2.6.0 release build. > > Simple java file and sample report is attached. Both labels in masterpage and > report body were localized correctly. I find something new. I use the engine to make the report in 2 steps : 1. Create the doc file with the command : runTask.run(docFileName); 2. Render the pdf file with the command : renderTask.render(); I see that: if I don't set the locale with runTask.setLocale(ULocale.ENGLISH) then the locale come from machine locale for Master Page if I don't set the locale with renderTask.setLocale(ULocale.ENGLISH) then the locale come from machine locale for Layout Page runTask is defined by IRunTask and renderTask is defined by IRenderTask
Localized value should not be saved into report document so that at render time the value can be localized according to render-time locale. This bug is caused by that the content of master page is saved into document after localization. Fix it by saving master page before localization. Please notice that the final result is localized according to render-time locale. If no locale specified at render-time, it's localized according to default machine locale.
Verified with 3.7.0.v20110304-0630