Class Translator

java.lang.Object
com.inet.report.translation.Translator

public class Translator extends Object
This class hold all methods for translation of an Engine. It list all text parts of an engine that can be translate and at runtime translates all parts which do not change the structure.
Since:
9.1
  • Constructor Details

    • Translator

      public Translator(Engine engine)
      Create a new translator for the given Engine. This make only sence for the main Engine.
      Parameters:
      engine - the Engine, the instance must not be null and the instance must not have been executed and must hold a loaded report
      Since:
      9.1
  • Method Details

    • listLabels

      public Set<String> listLabels(boolean useParagraph) throws ReportException
      Returns all strings that can be translated (i.e. labels, prompts and report title). This can be used as input for a translation tool.
      Parameters:
      useParagraph - true, then a paragraph is translated in one step.
      Returns:
      a list, never null
      Throws:
      ReportException - if Engine is finished or no report is set.
      Since:
      9.1
      See Also:
    • translate

      public void translate(ResourceBundle languageResource, boolean useParagraph) throws ReportException
      Translate all labels and the report title of the engine. This is used by the renderer itself if it has been enabled in the current configuration. If you use it at design time then it will change your design.
      Parameters:
      languageResource - the translation resource
      useParagraph - true, then a paragraph is translated in one step.
      Throws:
      ReportException - if Engine is finished or no report is set.
      Since:
      9.1
      See Also: