Uploaded image for project: 'Pentaho Reporting and Pentaho Report Designer'
  1. Pentaho Reporting and Pentaho Report Designer
  2. PRD-5018

[OEM] When using localization i want to look-up a translation from the resource file and then use that translation in a message field on the report.



    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.


      We currently use individual resource files containing the language translations for each report in our system. We are trying to make this a little more generic by using one resource file for each set of translations for our reports and this file would be generated by the list of translations we use in our ERP application. This seems to work fine for resource labels but creates issues for resource messages. We would prefer not to have any references to report fields in our translation list. Is there any way to look-up a translation from the resource file and then use that translation in a message field on the report? For example, we have the following in our resource file: PRINTED_ON=Printed On: $(report.date, date, yyyy-MM-dd hh:mm). Is there a way to look-up the translation for PRINTED_ON and then use that in a regular message field or expression with $(report.date, date, yyyy-MM-dd hh:mm)?

      Message from Thomas Morgner

      The only way I can imagine that to work in 0.8.9 is to create a own expression that does this kind of lookup they want. There is no built-in functionality that allows this find of double-lookup.

      Both the ResourceMessage- and Message-Field want to see real field references in the message-format, so the process they have to employ is:

      (1) Lookup the generic message
      (2) Format the message to replace the placeholders with
      real fieldnames.
      (3) Format the real message

      In 0.8.11, this can be somewhat simplified with the use of attribute-expressions, and thus reducing the number of global expressions on the report.

      If they want built-in support for that for the 0.8.11 codeline, please let them file a JIRA case for it.




            Unassigned Unassigned
            lyarbrough Lynn Yarbrough (Inactive)
            0 Vote for this issue
            1 Start watching this issue