Package org.xwiki.localization
Interface ContextualLocalizationManager
-
@Role public interface ContextualLocalizationManager
A helper forLocalizationManager
which get theLocale
fromLocalizationContext
and provide various common use cases methods.- Since:
- 5.0M1
- Version:
- $Id: 2b3186a0201408dfa487992b69b900576840c2dc $
- See Also:
LocalizationManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Translation
getTranslation(String key)
Find a translation in the current language.String
getTranslationPlain(String key, Object... parameters)
Find a translation in the current language.
-
-
-
Method Detail
-
getTranslation
Translation getTranslation(String key)
Find a translation in the current language.- Parameters:
key
- the key identifying the message to look for- Returns:
- the translation in the current language, null if no translation could be found
- See Also:
LocalizationManager.getTranslation(String, java.util.Locale)
,LocalizationContext.getCurrentLocale()
-
getTranslationPlain
String getTranslationPlain(String key, Object... parameters)
Find a translation in the current language.- Parameters:
key
- the key identifying the message to look forparameters
- the parameters- Returns:
- the translation in the current language rendered as plain text, null if no translation could be found
- See Also:
getTranslation(String)
-
-