| java.lang.Object clime.messadmin.i18n.I18NSupport
I18NSupport | public class I18NSupport (Code) | | ThreadLocal containing administration locale + i18n utilities.
author: Cédrik LIME since: 4.1 |
Method Summary | |
public static Locale | getAdminLocale() | public static String | getLocalizedMessage(String baseName, ClassLoader cl, String key, Object[] args) Retrieves the localized message corresponding to the given key, and
performs parametric replacement using the arguments specified via
args. | public static String | getLocalizedMessage(String baseName, ClassLoader cl, String key) | public static String | getLocalizedMessage(ClassLoader cl, String key, Object[] args) | public static String | getLocalizedMessage(ClassLoader cl, String key) | public static String | getLocalizedMessage(String key, Object[] args) | public static String | getLocalizedMessage(String key) | public static ResourceBundle | getResourceBundle(String baseName, Locale locale, ClassLoader cl) Gets the resource bundle with the given base name and preferred locale. | public static ResourceBundle | getResourceBundle(String baseName, ClassLoader cl) | public static void | setAdminLocale(Locale locale) |
DEFAULT_ADMIN_LOCALE | final public static Locale DEFAULT_ADMIN_LOCALE(Code) | | Default Locale to use for the administration application, if none is requested:
|
getLocalizedMessage | public static String getLocalizedMessage(String baseName, ClassLoader cl, String key, Object[] args)(Code) | | Retrieves the localized message corresponding to the given key, and
performs parametric replacement using the arguments specified via
args.
See the specification of
java.text.MessageFormat for a
description of how parametric replacement is implemented.
If no resource bundle with the given base name exists, or the given key
is undefined in the resource bundle, the string "???<key>???" is
returned, where "<key>" is replaced with the given key.
Parameters: baseName - the resource bundle base name Parameters: key - the message key Parameters: args - the arguments for parametric replacement the localized message corresponding to the given key |
getResourceBundle | public static ResourceBundle getResourceBundle(String baseName, Locale locale, ClassLoader cl)(Code) | | Gets the resource bundle with the given base name and preferred locale.
This method calls java.util.ResourceBundle.getBundle(), but ignores
its return value unless its locale represents an exact or language match
with the given preferred locale.
Parameters: baseName - the resource bundle base name Parameters: locale - the preferred locale the requested resource bundle, or null if no resourcebundle with the given base name exists or if there is no exact- orlanguage-match between the preferred locale and the locale ofthe bundle returned by java.util.ResourceBundle.getBundle(). See Also: clime.messadmin.taglib.fmt.BundleTag.findMatch(StringLocale) |
setAdminLocale | public static void setAdminLocale(Locale locale)(Code) | | |
|
|