Class WCombinedLocalizedStrings

java.lang.Object
eu.webtoolkit.jwt.WLocalizedStrings
eu.webtoolkit.jwt.WCombinedLocalizedStrings

public class WCombinedLocalizedStrings
extends WLocalizedStrings
A localized string resolver that bundles multiple string resolvers.

This class implements the localized strings interface and delegates WString#tr() string resolution to one or more string resolvers. You will typically use this class if you want to combine different methods of string resolution (e.g. some from files, and other strings using a database).

See Also:
WApplication.setLocalizedStrings(WLocalizedStrings translator)
  • Constructor Summary

    Constructors
    Constructor Description
    WCombinedLocalizedStrings()
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    void add​(WLocalizedStrings resolver)
    Adds a string resolver.
    java.util.List<WLocalizedStrings> getItems()
    Returns the list of resolvers.
    void hibernate()
    Purges memory resources, if possible.
    void insert​(int index, WLocalizedStrings resolver)
    Inserts a string resolver.
    void refresh()
    Rereads the message resources.
    void remove​(WLocalizedStrings resolver)
    Removes a string resolver.
    java.lang.String resolveKey​(java.lang.String key)
    Resolves a key in the current locale.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait