|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.lgc.wsh.util.Localize
public class Localize
Filter a string with specified ResourceBundles.
| Constructor Summary | |
|---|---|
Localize()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
filter(java.lang.String message,
java.lang.Class<?> resourceClass)
Filter the specified string with a ResourceBundle for the specified class. |
static java.lang.String |
filter(java.lang.String message,
java.util.ResourceBundle catalog)
Filter the specified string with the specified resource bundle. |
static java.lang.String |
timeWords(long seconds)
Convert a number of seconds into words |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Localize()
| Method Detail |
|---|
public static java.lang.String filter(java.lang.String message,
java.util.ResourceBundle catalog)
message - Filter this stringcatalog - Get keys and values from this.
public static java.lang.String filter(java.lang.String message,
java.lang.Class<?> resourceClass)
message - Filter this stringresourceClass - Use the class loader for this class
and load a localized PropertyResourceBundle with the same
name as the class. For example, a class Foo has
a Foo.properties and a Foo_ch.properties file in the same
directory as the compiled Foo.class.
Test with java -Duser.language=ch
public static java.lang.String timeWords(long seconds)
seconds - Number of seconds
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||