I hacked up a first solution. If REPORT_LOCALE is set, the component uses that for creating a Locale object and assigns that to the report.
I'll try to find out how the Pentaho server exposes the current locale and use that for a default value.
When I have a proper solution, I'll post it.
Code:
Index: /home/bb/download/apcenter/Pentaho/src-svn/1.6GA/pentaho-1.6.GA/server/pentaho/src/org/pentaho/plugin/jasperreports/JasperReportsComponent.java
===================================================================
--- /home/bb/download/apcenter/Pentaho/src-svn/1.6GA/pentaho-1.6.GA/server/pentaho/src/org/pentaho/plugin/jasperreports/JasperReportsComponent.java (revision 19525)
+++ /home/bb/download/apcenter/Pentaho/src-svn/1.6GA/pentaho-1.6.GA/server/pentaho/src/org/pentaho/plugin/jasperreports/JasperReportsComponent.java (working copy)
@@ -392,6 +392,12 @@
if (debug)
debug(Messages.getString("JasperReport.DEBUG_LOADED_DESIGN", Integer.toString(jrparams.length))); //$NON-NLS-1$
+ //Try to set the report locale
+ if (isDefinedInput("REPORT_LOCALE")) {
+ reportParameters.put("REPORT_LOCALE",
+ new java.util.Locale(getInputStringValue("REPORT_LOCALE")));
+ }
+
// Look for parameters marked as being prompted for
// TODO: Handle non-String type parameters
boolean needToPrompt = false;