org.zkoss.util.resource
Class Labels

java.lang.Object
  extended by org.zkoss.util.resource.Labels

public class Labels
extends java.lang.Object

Utilities to access labels. A label is a Locale-dependent string that is stored in i3-label*properties.

Author:
tomyeh

Method Summary
static java.lang.String getLabel(java.lang.String key)
          Returns the label of the specified key based on the current Locale, or null if no found.
static void register(LabelLocator locator)
          Registers a locator which is used to load i3-label*.properties from other resource, such as servlet contexts.
static void reset()
          Resets all cached labels and next call to getLabel(java.lang.String) will cause re-loading i3-label*.proerties.
static VariableResolver setVariableResolver(VariableResolver resolv)
          Sets the variable resolver, which is used if an EL expression is specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLabel

public static final java.lang.String getLabel(java.lang.String key)
Returns the label of the specified key based on the current Locale, or null if no found.

The current locale is given by Locales.getCurrent().


reset

public static final void reset()
Resets all cached labels and next call to getLabel(java.lang.String) will cause re-loading i3-label*.proerties.


setVariableResolver

public static final VariableResolver setVariableResolver(VariableResolver resolv)
Sets the variable resolver, which is used if an EL expression is specified.

Default: no resolver at all.

Returns:
the previous resolver, or null if no resolver.

register

public static final void register(LabelLocator locator)
Registers a locator which is used to load i3-label*.properties from other resource, such as servlet contexts.



Copyright © 2005-2007 Potix Corporation. All Rights Reserved.