Interface MessageBundle
public interface MessageBundle
Source for internationalized messages. This interface is used in lieu
of some other more direct source (e.g. ResourceBundles) so that we
can have the flexibility of backing the i18n messages with different
implementations.
-
Method Summary
Modifier and Type Method Description boolean
containsKey(java.util.Locale locale, java.lang.String key)
java.util.Enumeration<java.lang.String>
getKeys(java.util.Locale locale)
Returns an enumeration of all the keys in this MessageBundlejava.lang.String
getMessage(java.util.Locale locale, java.lang.String key)
Returns a localized stringjava.lang.String
getMessage(java.util.Locale locale, java.lang.String key, java.lang.Object[] args)
Returns a localized string
-
Method Details
-
getMessage
java.lang.String getMessage(java.util.Locale locale, java.lang.String key)Returns a localized string- Parameters:
locale
- the requested localekey
- the key to the localized string- Returns:
- a localized string
-
getMessage
java.lang.String getMessage(java.util.Locale locale, java.lang.String key, java.lang.Object[] args)Returns a localized string- Parameters:
locale
- the requested localekey
- the key to the localized stringargs
- array of message arguments for the externalized message- Returns:
- a localized string
-
getKeys
java.util.Enumeration<java.lang.String> getKeys(java.util.Locale locale)Returns an enumeration of all the keys in this MessageBundle- Parameters:
locale
- the requested locale- Returns:
- the key enumeration
-
containsKey
boolean containsKey(java.util.Locale locale, java.lang.String key)
-