Groovy Documentation

griffon.plugins.i18n
[Java] Interface ExtendedMessageSource

griffon.plugins.i18n.MessageSource
  griffon.plugins.i18n.ExtendedMessageSource
All Superinterfaces:
MessageSource

public interface ExtendedMessageSource
extends MessageSource

Interface for resolving messages, with support for the parameterization and internationalization of such messages. This interface extends MessageSource with support of named arguments.

Authors:
Alexander Klein


Method Summary
String getMessage(String key, Map args)

Try to resolve the message.

String getMessage(String key, Map args, Locale locale)

Try to resolve the message.

String getMessage(String key, Map args, String defaultMessage)

Try to resolve the message.

String getMessage(String key, Map args, String defaultMessage, Locale locale)

Try to resolve the message.

 
Methods inherited from interface MessageSource
getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage
 

Method Detail

getMessage

public String getMessage(String key, Map args)
Try to resolve the message.
throws:
NoSuchMessageException if no message is found
Parameters:
key - Key to lookup, such as 'log4j.appenders.console'
args - Arguments that will be filled in for params within the message (params look like "{key}" within a message, but this might differ between implementations), or null if none.
Returns:
The resolved message at the given key for the default locale


getMessage

public String getMessage(String key, Map args, Locale locale)
Try to resolve the message.
throws:
NoSuchMessageException if no message is found
Parameters:
key - Key to lookup, such as 'log4j.appenders.console'
args - Arguments that will be filled in for params within the message (params look like "{key}" within a message, but this might differ between implementations), or null if none.
locale - Locale in which to lookup
Returns:
The resolved message at the given key for the given locale


getMessage

public String getMessage(String key, Map args, String defaultMessage)
Try to resolve the message.
Parameters:
key - Key to lookup, such as 'log4j.appenders.console'
args - Arguments that will be filled in for params within the message (params look like "{key}" within a message, but this might differ between implementations), or null if none.
defaultMessage - Message to return if the lookup fails
Returns:
The resolved message at the given key for the default locale


getMessage

public String getMessage(String key, Map args, String defaultMessage, Locale locale)
Try to resolve the message.
Parameters:
key - Key to lookup, such as 'log4j.appenders.console'
args - Arguments that will be filled in for params within the message (params look like "{key}" within a message, but this might differ between implementations), or null if none.
defaultMessage - Message to return if the lookup fails
locale - Locale in which to lookup
Returns:
The resolved message at the given key for the given locale


 

Groovy Documentation