|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tanukisoftware.wrapper.WrapperResources
public final class WrapperResources
A resource bundle which is used to help localize applications to the default locale of the JVM. Resources are stored in MO files using the standard UNIX gettext resources. For example,
WrapperResources res = WrapperManager.loadWrapperResources( "myapp", "../lang/" );
To use the WrapperResources, make a call to any of the getString()
methods. If the resource files are not found, or the specific key is not found
then the key is returned unmodified.
Constructor Summary | |
---|---|
protected |
WrapperResources()
WrapperResources instances are created using the WrapperManager.loadWrapperResources method. |
Method Summary | |
---|---|
protected void |
finalize()
|
String |
getString(String key)
Request a localized version of the specified key. |
String |
getString(String key,
Object arg0)
Request a localized version of the specified key. |
String |
getString(String key,
Object[] arguments)
Request a localized version of the specified key. |
String |
getString(String key,
Object arg0,
Object arg1)
Request a localized version of the specified key. |
String |
getString(String key,
Object arg0,
Object arg1,
Object arg2)
Request a localized version of the specified key. |
String |
getString(String key,
Object arg0,
Object arg1,
Object arg2,
Object arg3)
Request a localized version of the specified key. |
String |
getString(String key,
Object arg0,
Object arg1,
Object arg2,
Object arg3,
Object arg4)
Request a localized version of the specified key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected WrapperResources()
Method Detail |
---|
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public String getString(String key)
key
- Resource to be localized.
public String getString(String key, Object[] arguments)
Individual tokens will be replaced with the specified parameters using the Java MessageFormat format method.
key
- Resource to be localized.arguments
- An array of argumens to be replaced in the resource.
MessageFormat
public String getString(String key, Object arg0)
Individual tokens will be replaced with the specified parameters using the Java MessageFormat format method.
key
- Resource to be localized.arg0
- An argument to be replaced in the resource.
MessageFormat
public String getString(String key, Object arg0, Object arg1)
Individual tokens will be replaced with the specified parameters using the Java MessageFormat format method.
key
- Resource to be localized.arg0
- An argument to be replaced in the resource.arg1
- An argument to be replaced in the resource.
MessageFormat
public String getString(String key, Object arg0, Object arg1, Object arg2)
Individual tokens will be replaced with the specified parameters using the Java MessageFormat format method.
key
- Resource to be localized.arg0
- An argument to be replaced in the resource.arg1
- An argument to be replaced in the resource.arg2
- An argument to be replaced in the resource.
MessageFormat
public String getString(String key, Object arg0, Object arg1, Object arg2, Object arg3)
Individual tokens will be replaced with the specified parameters using the Java MessageFormat format method.
key
- Resource to be localized.arg0
- An argument to be replaced in the resource.arg1
- An argument to be replaced in the resource.arg2
- An argument to be replaced in the resource.arg3
- An argument to be replaced in the resource.
MessageFormat
public String getString(String key, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4)
Individual tokens will be replaced with the specified parameters using the Java MessageFormat format method.
key
- Resource to be localized.arg0
- An argument to be replaced in the resource.arg1
- An argument to be replaced in the resource.arg2
- An argument to be replaced in the resource.arg3
- An argument to be replaced in the resource.arg4
- An argument to be replaced in the resource.
MessageFormat
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |