Package org.craftercms.commons.i10n
Class I10nUtils
java.lang.Object
org.craftercms.commons.i10n.I10nUtils
Utility class for localization stuff.
- Author:
- avasquez
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getLocalizedMessage
(String bundleName, String key, Object... args) Returns a formatted, localized message according to the specified resource bundle and key.static String
getLocalizedMessage
(ResourceBundle bundle, String key, Object... args) Returns a formatted, localized message according to the specified resource bundle and key.
-
Field Details
-
DEFAULT_ERROR_MESSAGE_BUNDLE_NAME
- See Also:
-
DEFAULT_LOGGING_MESSAGE_BUNDLE_NAME
- See Also:
-
-
Method Details
-
getLocalizedMessage
Returns a formatted, localized message according to the specified resource bundle and key.- Parameters:
bundleName
- the name of the resource bundle where the message format should bekey
- the key of the message formatargs
- the args of the message format- Returns:
- the formatted, localized message
-
getLocalizedMessage
Returns a formatted, localized message according to the specified resource bundle and key.- Parameters:
bundle
- the resource bundle where the message format should bekey
- the key of the message formatargs
- the args of the message format- Returns:
- the formatted, localized message
-