createLocalisedView
<T extends PluginDataContainer> T createLocalisedView(Class<T> clazz,
T target,
Locale locale)
Create a localised view on the given target
object. For
performance reasons, the target
object will be returned, if no
translation is found in the plug-in data or the designated locale is
null
.
- Type Parameters:
T
- The type of the target
.
- Parameters:
clazz
- The model interface, i.e. the interface for accessing the
target
target
- The actual model object.
locale
- The locale for which the values should be translated.
- Returns:
- A translating view on the target object, or the target object
itself, if no translation is available.