public abstract class AbstractI18nResolver extends Object implements com.atlassian.sal.api.message.I18nResolver
IMPORTANT! JRA-25571 Do not add dependency on sal-core to jira-core: this causes Bugs due to ClassLoader issues.
Note: to be removed once SAL-214 is fixed.
| Constructor and Description |
|---|
AbstractI18nResolver() |
| Modifier and Type | Method and Description |
|---|---|
com.atlassian.sal.api.message.Message |
createMessage(String key,
Serializable... arguments) |
com.atlassian.sal.api.message.MessageCollection |
createMessageCollection() |
String |
getText(Locale locale,
com.atlassian.sal.api.message.Message message) |
String |
getText(Locale locale,
String key) |
String |
getText(Locale locale,
String key,
Serializable... arguments) |
String |
getText(com.atlassian.sal.api.message.Message message) |
String |
getText(String key) |
String |
getText(String key,
Serializable... arguments) |
abstract String |
resolveText(Locale locale,
String key,
Serializable[] arguments)
Subclasses should implement this method to dispatch to a matching language in the given locale.
|
abstract String |
resolveText(String key,
Serializable[] arguments)
Subclasses should implement this method to dispatch to a matching language in (in order of preference):
the user's locale
the application's configured locale, or
the system default locale
|
public String getText(String key, Serializable... arguments)
getText in interface com.atlassian.sal.api.message.I18nResolverpublic String getText(Locale locale, String key, Serializable... arguments)
getText in interface com.atlassian.sal.api.message.I18nResolverpublic String getText(String key)
getText in interface com.atlassian.sal.api.message.I18nResolverpublic String getText(Locale locale, String key)
getText in interface com.atlassian.sal.api.message.I18nResolverpublic String getText(com.atlassian.sal.api.message.Message message)
getText in interface com.atlassian.sal.api.message.I18nResolverpublic String getText(Locale locale, com.atlassian.sal.api.message.Message message)
getText in interface com.atlassian.sal.api.message.I18nResolverpublic abstract String resolveText(String key, Serializable[] arguments)
key - the key to translate.arguments - the arguments to be inserted into the translated string.public abstract String resolveText(Locale locale, String key, Serializable[] arguments)
locale - the locale to translate into.key - the key to translate.arguments - the arguments to be inserted into the translated string.public com.atlassian.sal.api.message.Message createMessage(String key, Serializable... arguments)
createMessage in interface com.atlassian.sal.api.message.I18nResolverpublic com.atlassian.sal.api.message.MessageCollection createMessageCollection()
createMessageCollection in interface com.atlassian.sal.api.message.I18nResolverCopyright © 2002-2023 Atlassian. All Rights Reserved.