public class ResourceBundleManager extends Object
Constructor and Description |
---|
ResourceBundleManager(String bundleClassName)
Creates a new ResourceBundleManager for the given ResourceBundle class
using the default Locale.
|
ResourceBundleManager(String bundleClassName,
Locale locale)
Creates a new ResourceBundleManager for the given ResourceBundle class
using the given Locale.
|
Modifier and Type | Method and Description |
---|---|
String |
getString(String name)
Returns the message that maps to the given name in the ResourceBundle.
|
String |
getString(String name,
Object[] parameters)
Returns the String that maps to the given name, using this
ResourceBundleManager's MessageFormat object to format the message
with the given
parameters . |
void |
setLocale(Locale locale)
Sets the Locale that should be used for messages and formatting.
|
public ResourceBundleManager(String bundleClassName)
bundleClassName
- the name of the ResourceBundle class to manage.public void setLocale(Locale locale)
locale
- the Locale to use.public String getString(String name)
name
- the name of the message to retrieve.public String getString(String name, Object[] parameters)
parameters
.name
- the name of the message to retrieve.parameters
- the list of paramters to use in the message.Copyright © 2023. All rights reserved.