Package org.eclipse.e4.ui.model
Class LocalizationHelper
java.lang.Object
org.eclipse.e4.ui.model.LocalizationHelper
This class provides set of utility method that can be useful in typical
 localization scenarios.
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringgetLocalized(String key, MApplicationElement element) Returns localized string for the key using locale information specified in the element's context.static StringgetLocalized(String key, MApplicationElement element, IEclipseContext context) Returns localized string for the key from the application element using translation service from the context.static StringReturns localized accessibilityPhrase for the specified element using locale information from its context.static StringgetLocalizedFeature(org.eclipse.emf.ecore.EStructuralFeature feature, MApplicationElement element) static StringgetLocalizedLabel(MUIElement element) Returns localized label for the specified element using locale information from its context.static StringgetLocalizedTooltip(MUIElement element) Returns localized tooltip for the specified element using locale information from its context.
- 
Method Details- 
getLocalizedFeaturepublic static String getLocalizedFeature(org.eclipse.emf.ecore.EStructuralFeature feature, MApplicationElement element) 
- 
getLocalizedAccessibilityPhraseReturns localized accessibilityPhrase for the specified element using locale information from its context.- Parameters:
- element- the element
- Returns:
- localized element's accessibilityPhrase, or nullif no label can be found
 
- 
getLocalizedLabelReturns localized label for the specified element using locale information from its context.- Parameters:
- element- the element
- Returns:
- localized element's label, or nullif no label can be found
 
- 
getLocalizedTooltipReturns localized tooltip for the specified element using locale information from its context.- Parameters:
- element- the element
- Returns:
- localized element's tooltip, or nullif no tooltip can be found
 
- 
getLocalizedReturns localized string for the key using locale information specified in the element's context.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. - Parameters:
- key- the key
- element- the model element
- Returns:
- localized key
 
- 
getLocalizedReturns localized string for the key from the application element using translation service from the context.This method will return the key itself if the context is nullor there is no translation service registered in the given context.- Parameters:
- key- the key
- element- the model element
- context- the context
- Returns:
- localized key
 
 
-