Adempiere's legacy reports and documents can be printed in the language of the business partner associated with a document.
This is achieved using the Multilingual documents setting at client level and the language setting of the business partner.
The ReportEngine class sets the language of a printing document according to these above settings.
The ReportStarter class which is specific for running jasper reports doesn't in the current version regard this language setting, it
simply uses the language of the logged in user.
See also discussion at: https://sourceforge.net/projects/adempiere/forums/forum/610548/topic/3532185
The ReportEngine determines the language by looking at the type of report. This type is never sent to the ReportStarter, however, an instance
of the ReportEngine is available in the ReportCtl class that starts the ReportStarter. Since the ReportEngine instance already has determined the language of the document we just need to pass on the language from the ReportEngine to the ReportStarter.
In the bug solution the language is passed to ReportStarter using existing parameter ProcessInfo.
If the document printed is a multilingual document a ProcessInfoParameter named "CURRENT_LANG" with the language of the ReportEngine is attached to the ProcessInfo passed to ReportStarter.
The ProcessInfoParameter is extracted in the ReportStarter and sent to the JasperReport. The logic to determine what language to use in what document is untouched and now it also works for Jasper Reports.
Patch attached.
Suggested patch
Fix committed:
http://adempiere.svn.sourceforge.net/viewvc/adempiere?view=rev&revision=11355
Arrived to /release with revision 11372
Regards,
Carlos Ruiz
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).