public class BundleStringResourceLoader extends Object implements IStringResourceLoader
Constructor and Description |
---|
BundleStringResourceLoader(String bundleName)
Create the loader with the name of the given Java resource bundle.
|
Modifier and Type | Method and Description |
---|---|
String |
loadStringResource(Class<?> clazz,
String key,
Locale locale,
String style,
String variation)
Get the value via a Java ResourceBundle
|
String |
loadStringResource(Component component,
String key,
Locale locale,
String style,
String variation)
Get the requested string resource from the underlying resource bundle.
|
public BundleStringResourceLoader(String bundleName)
bundleName
- The name of the resource bundlepublic final String loadStringResource(Class<?> clazz, String key, Locale locale, String style, String variation)
loadStringResource
in interface IStringResourceLoader
clazz
- The class to get the string resource forkey
- The key should be a String containing a lookup key into a resource bundlelocale
- The locale should contain the locale of the current operation so that the
appropriate set of resources can be selectedstyle
- The style identifying the resource set to select the strings from (see
Session
)variation
- The components variation (of the style)public final String loadStringResource(Component component, String key, Locale locale, String style, String variation)
loadStringResource
in interface IStringResourceLoader
component
- Used to get the localekey
- The key to obtain the string forlocale
- If != null, it supersedes the component's localestyle
- ignoredvariation
- ignoredCopyright © 2006–2022 Apache Software Foundation. All rights reserved.