From Documentation

Jump to: navigation, search





String l2(String key, Object[] args);
i.e., CommonFns.getLabel(String, Object[])

Returns the label of the given key defined in the internationalization labels, and formats it with the given arguments. The formatting is done by the use of MessageFormat.

The label is based on the current Locale (Locales.getCurrent()).

For example, let us assume we want to generate a full name based on the current Locale, then we could use ${c:l2('key',args)} to generate concatenated messages as follows.

<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<label value="${c:l2('fullname.format', fullname)}">

where we assume fullname is a string array (such as new String[] {"Jimmy", "Shiau"}).

Version History

Last Update : 2011/8/3


Version Date Content
     




Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.