|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.util.i18n.DefaultI18NBean
public class DefaultI18NBean
Responsible for fetching internationalised text given a key. By default, this will only search the default resource bundle for ConfluenceActionSupport.class
To access i18n keys in resource bundles for other classes: specify these classes in a list (use fully qualified class names)
Field Summary | |
---|---|
static org.apache.log4j.Logger |
log
Deprecated. |
Fields inherited from interface com.atlassian.confluence.util.i18n.I18NBean |
---|
DEFAULT_RESOURCE_BUNDLE |
Constructor Summary | |
---|---|
DefaultI18NBean(java.util.Locale locale,
com.atlassian.plugin.PluginAccessor pluginManager)
|
Method Summary | |
---|---|
java.util.ResourceBundle |
getResourceBundle()
|
java.lang.String |
getText(Message message)
Gets the i18n text for the specified message, formatting the message's value and arguments with MessageFormat. |
java.lang.String |
getText(java.lang.String key)
Get the i18n text for a particular key. |
java.lang.String |
getText(java.lang.String key,
java.util.List list)
|
java.lang.String |
getText(java.lang.String key,
java.lang.Object[] args)
Get the i18n text for a particular key, formatted through MessageFormat with the given arguments. |
java.lang.String |
getTextStrict(java.lang.String i18nKey)
Needed for text that should not be marked up (for example, values for the 'accessKey' attribute in an input element) |
boolean |
isI18nHighlightMode()
|
boolean |
isShowKeyMode()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Deprecated public static final org.apache.log4j.Logger log
Constructor Detail |
---|
public DefaultI18NBean(java.util.Locale locale, com.atlassian.plugin.PluginAccessor pluginManager)
Method Detail |
---|
public java.lang.String getText(java.lang.String key)
getText
in interface I18NBean
public java.lang.String getText(java.lang.String key, java.lang.Object[] args)
ActionSupport.getText(String, java.util.List)
, but the array form is necessary to work well
with Velocity.
getText
in interface I18NBean
key
- the key to retrieve the i18n text forargs
- an array of arguments to be passed in to the MessageFormat#format for this text
ActionSupport.getText(String, java.util.List)
,
MessageFormat
public java.lang.String getText(java.lang.String key, java.util.List list)
getText
in interface I18NBean
public java.lang.String getText(Message message)
I18NBean
getText
in interface I18NBean
message
- the message to format, containing an i18n key and arguments
public java.lang.String getTextStrict(java.lang.String i18nKey)
getTextStrict
in interface I18NBean
i18nKey
-
public java.util.ResourceBundle getResourceBundle()
getResourceBundle
in interface I18NBean
public boolean isI18nHighlightMode()
isI18nHighlightMode
in interface I18NBean
public boolean isShowKeyMode()
isShowKeyMode
in interface I18NBean
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |