|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface I18NBean
Responsible for fetching internationalised text for a given key.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_RESOURCE_BUNDLE
|
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) |
java.util.Map<java.lang.String,java.lang.String> |
getTranslationsForPrefix(java.lang.String prefix)
Gets a map of all keys that start with the given prefix, and their corresponding localised text, suitable for rendering with MessageFormat . |
java.lang.String |
getUntransformedRawText(java.lang.String key)
Same as getText(String) but does not apply any TranslationTransform s. |
Field Detail |
---|
static final java.lang.String DEFAULT_RESOURCE_BUNDLE
Method Detail |
---|
java.lang.String getText(@Nullable java.lang.String key)
java.lang.String getText(@Nullable java.lang.String key, @Nullable java.lang.Object[] args)
ActionSupport.getText(String, java.util.List)
, but the array form is necessary to work well
with Velocity.
key
- the key to retrieve the i18n text forargs
- an array of arguments to be passed in to the MessageFormat.format(java.lang.Object[], java.lang.StringBuffer, java.text.FieldPosition)
for this text
ActionSupport.getText(String, java.util.List)
,
MessageFormat
java.lang.String getText(@Nullable java.lang.String key, @Nullable java.util.List list)
java.lang.String getText(Message message)
MessageFormat
.
message
- the message to format, containing an i18n key and arguments
java.lang.String getTextStrict(java.lang.String i18nKey)
i18nKey
- the key to retrieve localised text for
java.util.ResourceBundle getResourceBundle()
java.util.Map<java.lang.String,java.lang.String> getTranslationsForPrefix(java.lang.String prefix)
MessageFormat
.
It is strongly recommended that plugin developers not use this, as its performance is not guaranteed.
Instead, apply translations for specific keys (e.g. via the jsI18n web resource transformer).
java.lang.String getUntransformedRawText(java.lang.String key)
getText(String)
but does not apply any TranslationTransform
s.
key
- the key of the i18n message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |