public interface

I18NBean

com.atlassian.confluence.util.i18n.I18NBean
Known Indirect Subclasses

Class Overview

Responsible for fetching internationalised text for a given key.

Summary

Fields
public static final String DEFAULT_RESOURCE_BUNDLE
Public Methods
abstract ResourceBundle getResourceBundle()
abstract String getText(String key)
Get the i18n text for a particular key.
abstract String getText(String key, List list)
abstract String getText(Message message)
Gets the i18n text for the specified message, formatting the message's value and arguments with MessageFormat.
abstract String getText(String key, Object[] args)
Get the i18n text for a particular key, formatted through MessageFormat with the given arguments.
abstract String getTextStrict(String i18nKey)
Needed for text that should not be marked up (for example, values for the 'accessKey' attribute in an input element)
abstract boolean isI18nHighlightMode()
abstract boolean isShowKeyMode()

Fields

public static final String DEFAULT_RESOURCE_BUNDLE

Public Methods

public abstract ResourceBundle getResourceBundle ()

public abstract String getText (String key)

Get the i18n text for a particular key.

public abstract String getText (String key, List list)

public abstract String getText (Message message)

Gets the i18n text for the specified message, formatting the message's value and arguments with MessageFormat.

Parameters
message the message to format, containing an i18n key and arguments
Returns
  • the formatted message

public abstract String getText (String key, Object[] args)

Get the i18n text for a particular key, formatted through MessageFormat with the given arguments. Works similarly to getText(String, java.util.List), but the array form is necessary to work well with Velocity.

Parameters
key the key to retrieve the i18n text for
args an array of arguments to be passed in to the MessageFormat#format for this text
Returns
  • the appropriate i18n text, formatted with the supplied arguments

public abstract String getTextStrict (String i18nKey)

Needed for text that should not be marked up (for example, values for the 'accessKey' attribute in an input element)

Parameters
i18nKey the key to retrieve localised text for
Returns
  • text for i18nKey (and excludes markup regardless of settings)

public abstract boolean isI18nHighlightMode ()

public abstract boolean isShowKeyMode ()