TextResource

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

TextResource interface.

Attributes

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

Members list

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.

Value parameters

key

the resource bundle key that is to be searched for

Attributes

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.

Value parameters

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

Attributes

Returns

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

def locale: Locale

Attributes

Returns

locale