org.sonar.core.i18n
Class I18nManager
java.lang.Object
org.sonar.core.i18n.I18nManager
- All Implemented Interfaces:
- Extension, I18n, ServerComponent, ServerExtension
public class I18nManager
- extends Object
- implements I18n, ServerExtension
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ENGLISH_PACK_PLUGIN_KEY
public static final String ENGLISH_PACK_PLUGIN_KEY
- See Also:
- Constant Field Values
BUNDLE_PACKAGE
public static final String BUNDLE_PACKAGE
- See Also:
- Constant Field Values
I18nManager
public I18nManager(PluginRepository pluginRepository)
start
public void start()
message
public String message(Locale locale,
String key,
String defaultValue,
Object... parameters)
- Description copied from interface:
I18n
- Searches the message of the
key
for the locale
in the list of available bundles.
If not found in any bundle, defaultText
is returned.
If additional parameters are given (in the objects list), the result is used as a message pattern
to use in a MessageFormat object along with the given parameters.
- Specified by:
message
in interface I18n
- Parameters:
locale
- the locale to translate intokey
- the key of the pattern to translatedefaultValue
- the default pattern returned when the key is not found in any bundleparameters
- the parameters used to format the message from the translated pattern.
- Returns:
- the message formatted with the translated pattern and the given parameters
Copyright © 2009-2011 SonarSource. All Rights Reserved.