TextResource

org.beangle.commons.text.i18n.TextResource
See theTextResource companion object

TextResource interface.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Concise view

Value members

Abstract methods

def apply(key: String): Option[String]

Gets a message based on a message key, or null if no message is found.

Gets a message based on a message key, or null if no message is found.

Attributes

key

the resource bundle key that is to be searched for

Returns:

the message as found in the resource bundle, or null if none is found.

def apply(key: String, defaultValue: String, obj: Any*): String

Gets a message based on a key using the supplied obj, as defined in [[java.text.MessageFormat]], or, if the message is not found, a supplied default value is returned.

Gets a message based on a key using the supplied obj, as defined in [[java.text.MessageFormat]], or, if the message is not found, a supplied default value is returned.

Attributes

defaultValue

the default value which will be returned if no message is found

key

the resource bundle key that is to be searched for

obj

obj to be used in a [[java.text.MessageFormat]] message

Returns:

the message as found in the resource bundle, or defaultValue if none is found

def locale: Locale

Attributes

Returns:

locale