public abstract class

AbstractI18nResolver

extends Object
implements I18nResolver
java.lang.Object
   ↳ com.atlassian.jira.i18n.AbstractI18nResolver
Known Direct Subclasses

Class Overview

Copied from sal-core.

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.

Summary

Public Constructors
AbstractI18nResolver()
Public Methods
Message createMessage(String key, Serializable... arguments)
MessageCollection createMessageCollection()
String getText(Message message)
String getText(Locale locale, String key)
String getText(Locale locale, Message message)
String getText(String key)
String getText(String key, Serializable... arguments)
String getText(Locale locale, 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
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.sal.api.message.I18nResolver

Public Constructors

public AbstractI18nResolver ()

Public Methods

public Message createMessage (String key, Serializable... arguments)

public MessageCollection createMessageCollection ()

public String getText (Message message)

public String getText (Locale locale, String key)

public String getText (Locale locale, Message message)

public String getText (String key)

public String getText (String key, Serializable... arguments)

public String getText (Locale locale, String key, Serializable... arguments)

public abstract String resolveText (Locale locale, String key, Serializable[] arguments)

Subclasses should implement this method to dispatch to a matching language in the given locale.

Parameters
locale the locale to translate into.
key the key to translate.
arguments the arguments to be inserted into the translated string.
Returns
  • the translated string.

public 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

Parameters
key the key to translate.
arguments the arguments to be inserted into the translated string.
Returns
  • the translated string.