|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.webtoolkit.jwt.WLocalizedStrings
eu.webtoolkit.jwt.WStdLocalizedStrings
public class WStdLocalizedStrings
A localized strings implementation that uses ResourceBundle resource bundles.
This localized strings class will translate localized WString strings in the WApplication.getLocale()
based on their WString.getKey().
When a key cannot be found (not in the locale specific or default bundle), the translated string will be "??key??".
WApplication.setLocalizedStrings(WLocalizedStrings)| Constructor Summary | |
|---|---|
WStdLocalizedStrings()
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
containsXML()
Returns whether this contains only valid XML. |
void |
refresh()
Rereads the message resources. |
java.lang.String |
resolveKey(java.lang.String key)
Resolves a key in the current locale. |
void |
setContainsXML(boolean containsXML)
Sets whether this resource bundle contains only valid XML. |
void |
use(java.lang.String bundleName)
Set the bundle name. |
| Methods inherited from class eu.webtoolkit.jwt.WLocalizedStrings |
|---|
hibernate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WStdLocalizedStrings()
| Method Detail |
|---|
public void use(java.lang.String bundleName)
ResourceBundle.getBundle(String).
bundleName - public void refresh()
WLocalizedStringsPurge any cached key/values, if applicable.
The default implementation does nothing.
refresh in class WLocalizedStringspublic java.lang.String resolveKey(java.lang.String key)
WLocalizedStrings
This method is used by WString to obtain the UTF8 value
corresponding to a key in the current locale.
Returns the value if the key could be resolved. Returns null
otherwise.
resolveKey in class WLocalizedStringsWApplication.getLocale(),
WString.tr(String key)public boolean containsXML()
public void setContainsXML(boolean containsXML)
containsXML - containsXML()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||