public class SetContentBundleTag
extends TagSupport
SetContentBundleTag implements a custom tag, which sets a
LocalizationContext backed with a ContentResourceBundle. This
allows one to use property names as keys in a JSTL formatting action and use
the value of the property as localized message.
The provided resource bundle also uses the resource bundle provided by CQ as a fallback if the underlying Resource does not contain a certain key.
The language/locale of the CQ resource bundle is determined depending on the "source" attribute, which can be either
| Constructor and Description |
|---|
SetContentBundleTag() |
| Modifier and Type | Method and Description |
|---|---|
int |
doEndTag()
Sets a default
LocalizationContext in Config with a page
scope. |
String |
getBasename() |
String |
getLanguage() |
String |
getSource() |
void |
setBasename(String basename) |
void |
setLanguage(String language) |
void |
setSource(String source) |
public int doEndTag()
LocalizationContext in Config with a page
scope.#EVAL_PAGE.public void setSource(String source) throws JspException
JspExceptionpublic String getSource()
public String getLanguage()
null
if the language should be derived from the path of the current resource.public void setLanguage(String language)
language - the language that will be used when a resource bundle is
obtained.public String getBasename()
null.public void setBasename(String basename)
basename - the basename that will be used when a resource bundle is
obtained."Copyright © 2010 - 2017 Adobe Systems Incorporated. All Rights Reserved"