public final class LocalizationHelper
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getLocalized(java.lang.String key,
MApplicationElement element)
Returns localized string for the key using locale information specified
in the element's context.
|
static java.lang.String |
getLocalized(java.lang.String key,
MApplicationElement element,
IEclipseContext context)
Returns localized string for the key from the application element using
translation service from the context.
|
static java.lang.String |
getLocalizedAccessibilityPhrase(MUIElement element)
Returns localized accessibilityPhrase for the specified element using
locale information from its context.
|
static java.lang.String |
getLocalizedFeature(EStructuralFeature feature,
MApplicationElement element) |
static java.lang.String |
getLocalizedLabel(MUIElement element)
Returns localized label for the specified element using locale
information from its context.
|
static java.lang.String |
getLocalizedTooltip(MUIElement element)
Returns localized tooltip for the specified element using locale
information from its context.
|
public static java.lang.String getLocalizedFeature(EStructuralFeature feature,
MApplicationElement element)
public static java.lang.String getLocalizedAccessibilityPhrase(MUIElement element)
element - the elementnull if
no label can be foundpublic static java.lang.String getLocalizedLabel(MUIElement element)
element - the elementnull if no label can
be foundpublic static java.lang.String getLocalizedTooltip(MUIElement element)
element - the elementnull if no tooltip
can be foundpublic static java.lang.String getLocalized(java.lang.String key,
MApplicationElement element)
This method will return the key itself if the context can not be found for the model element or there is no translation service registered in that context.
key - the keyelement - the model elementpublic static java.lang.String getLocalized(java.lang.String key,
MApplicationElement element,
IEclipseContext context)
This method will return the key itself if the context is null
or there is no translation service registered in the given context.
key - the keyelement - the model elementcontext - the context