public class I18nManager extends Object implements I18n, ServerExtension
Modifier and Type | Field and Description |
---|---|
static String |
BUNDLE_PACKAGE |
static String |
ENGLISH_PACK_PLUGIN_KEY |
Constructor and Description |
---|
I18nManager(PluginRepository pluginRepository) |
public static final String ENGLISH_PACK_PLUGIN_KEY
public static final String BUNDLE_PACKAGE
public I18nManager(PluginRepository pluginRepository)
public void start()
public String message(Locale locale, String key, String defaultValue, Object... parameters)
I18n
key
for the locale
in the list of available bundles.
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.message
in interface I18n
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.Copyright © 2009-2012 SonarSource. All Rights Reserved.