i-net Clear Reports

com.inet.report.translation
Class Translator

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

public class Translator
extends java.lang.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 Summary
Translator(Engine engine)
          Create a new translator for the given Engine.
 
Method Summary
 java.util.Set listLabels(boolean useParagraph)
          List all string that can be translated (i.e. labels, prompts and report title).
 void translate(java.util.ResourceBundle languageResource, boolean useParagraph)
          Translate all labels and the report title of the engine.
 

Constructor Detail

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 Detail

listLabels

public java.util.Set listLabels(boolean useParagraph)
                         throws ReportException
List all string 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:
Translations.setUseParagraph(boolean)

translate

public void translate(java.util.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:
Translations.setUseParagraph(boolean)

i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH