public class Translations
extends java.lang.Object
implements java.io.Serializable
Engine.getTranslations()
,
Serialized FormModifier and Type | Method and Description |
---|---|
java.util.List<java.util.Locale> |
getAvailableLocales()
Get a list of all available translation locales in this report.
|
java.util.ResourceBundle |
getResourceBundle(java.util.Locale locale)
Request a resource bundle for translation the current report.
|
java.lang.String |
getResourceBundleName()
Get the base name of the ResourceBundle
|
java.util.Properties |
getTranslation(java.util.Locale locale)
Request the property of a translation for the given locale.
|
boolean |
isUseParagraph()
Get the flag useParagraph.
|
void |
setResourceBundleName(java.lang.String name)
Set an optional ResourceBundle.
|
void |
setTranslation(java.util.Locale locale,
java.util.Properties props)
Set a new translation for the current report/engine or remove it.
|
void |
setUseParagraph(boolean useParagraph)
Set the flag useParagraph.
|
public java.util.ResourceBundle getResourceBundle(java.util.Locale locale)
locale
- the locale for which a resource bundle is desired, can not be nullpublic java.util.Properties getTranslation(java.util.Locale locale)
locale
- the locale for which a translation is desired, can not be nullgetAvailableLocales()
,
setTranslation(Locale, Properties)
public void setTranslation(java.util.Locale locale, java.util.Properties props)
locale
- the locale of the translationprops
- the new key/value pairs. The required keys can be request via Translator.listLabels(boolean)
.
A value of null remove it.getTranslation(Locale)
public java.util.List<java.util.Locale> getAvailableLocales()
setTranslation(Locale, Properties)
public void setUseParagraph(boolean useParagraph)
useParagraph
- the value of the flag useParagraph.isUseParagraph()
,
Translator.listLabels(boolean)
public boolean isUseParagraph()
setUseParagraph(boolean)
public void setResourceBundleName(java.lang.String name)
name
- the base name of the ResourceBundle or nullgetResourceBundleName()
public java.lang.String getResourceBundleName()
setResourceBundleName(String)
Copyright © 1999-2020 by i-net software GmbH