Class TranslationHandle
java.lang.Object
org.eclipse.birt.report.model.api.ElementDetailHandle
org.eclipse.birt.report.model.api.TranslationHandle
Represents a translation message in the design. A translation message is used
for the user to save their localized information in the design.
- See Also:
-
TranslationTable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.eclipse.birt.report.model.elements.Translation
The translation message.Fields inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle
elementHandle
-
Constructor Summary
ConstructorsConstructorDescriptionTranslationHandle
(ModuleHandle moduleHandle, org.eclipse.birt.report.model.elements.Translation trans) Constructs a handle for a translation message. -
Method Summary
Modifier and TypeMethodDescriptionReturns the locale of the translation message.Returns the resource key of the translation.getText()
Returns translated text for the translation, the text defined for the locale.void
Sets the locale of the translation message.void
Sets the translated text for the translation message.Methods inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle
getDesign, getElement, getElementHandle, getModule
-
Field Details
-
translation
protected org.eclipse.birt.report.model.elements.Translation translationThe translation message.
-
-
Constructor Details
-
TranslationHandle
public TranslationHandle(ModuleHandle moduleHandle, org.eclipse.birt.report.model.elements.Translation trans) Constructs a handle for a translation message.- Parameters:
moduleHandle
- a handle to a moduletrans
- the translation instance to be handled.
-
-
Method Details
-
getResourceKey
Returns the resource key of the translation.- Returns:
- the resource key for the translation
-
setLocale
Sets the locale of the translation message.- Parameters:
newLocale
- new locale of the translation- Throws:
CustomMsgException
- if the translation message is not found in the design.
-
getLocale
Returns the locale of the translation message.- Returns:
- the locale of the translation message
-
setText
Sets the translated text for the translation message.- Parameters:
text
- translated text for the locale.- Throws:
CustomMsgException
- if the translation message is not found in the design.
-
getText
Returns translated text for the translation, the text defined for the locale.- Returns:
- translated text for the translation
-