org.xwiki.localization
Interface ContextualLocalizationManager


@Role
public interface ContextualLocalizationManager

A helper for LocalizationManager which get the Locale from LocalizationContext and provide various common use cases methods.

Since:
5.0M1
Version:
$Id: d450739ed4a77373c7942043e4615215831a3030 $
See Also:
LocalizationManager

Method Summary
 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
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 for
parameters - the parameters
Returns:
the translation in the current language rendered as plain text
See Also:
getTranslation(String)


Copyright © 2004–2014 XWiki. All rights reserved.