public class StringTranslator extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
RESOURCE_BUNDLE_NAME
Unqualified name for resource bundles.
|
| Constructor and Description |
|---|
StringTranslator(String packageName,
ClassLoader classLoader)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getString(String key)
Get a localized string using the specified resource key.
|
String |
getString(String key,
Object insert1)
Get a localized string using the specified resource key.
|
String |
getString(String key,
Object[] inserts)
Get a localized string using the specified resource key.
|
String |
getString(String key,
Object insert1,
Object insert2)
Get a localized string using the specified resource key.
|
String |
getString(String key,
Object insert1,
Object insert2,
Object insert3)
Get a localized string using the specified resource key.
|
String |
getString(String key,
Object insert1,
Object insert2,
Object insert3,
Object insert4)
Get a localized string using the specified resource key.
|
String |
getString(String key,
Object insert1,
Object insert2,
Object insert3,
Object insert4,
Object insert5)
Get a localized string using the specified resource key.
|
public static final String RESOURCE_BUNDLE_NAME
public StringTranslator(String packageName, ClassLoader classLoader)
packageName - - the name of the package that contains the resource
bundle.classLoader - - the class loader to be used for loading the resource
bundle. If this parameter is null, the current class loader is used.public String getString(String key)
key - - the key to the localized string in the resource bundle.public String getString(String key, Object insert1)
key - - the key to the localized string in the resource bundle.insert1 - - the message insert.public String getString(String key, Object insert1, Object insert2)
key - - the key to the localized string in the resource bundle.insert1 - - the first message insert.insert2 - - the second message insert.public String getString(String key, Object insert1, Object insert2, Object insert3)
key - - the key to the localized string in the resource bundle.insert1 - - the first message insert.insert2 - - the second message insert.insert3 - - the third message insert.public String getString(String key, Object insert1, Object insert2, Object insert3, Object insert4)
key - - the key to the localized string in the resource bundle.insert1 - - the first message insert.insert2 - - the second message insert.insert3 - - the third message insert.insert4 - - the fourth message insert.public String getString(String key, Object insert1, Object insert2, Object insert3, Object insert4, Object insert5)
key - - the key to the localized string in the resource bundle.insert1 - - the first message insert.insert2 - - the second message insert.insert3 - - the third message insert.insert4 - - the fourth message insert.insert5 - - the fifth message insert.public String getString(String key, Object[] inserts)
key - - the key to the localized string in the resource bundle.inserts - - the array of message inserts.Copyright © 2011-2016 OpenESB Community. All Rights Reserved.