content
Tag resourceBundle


display a specific value in a resource bundle.

This tag can be used to dynamically request a given resource from the engine resource bundle.

If locale is not set, the locale used is the one returned by paramBean.getLocale().

Similar in functionality to content:message.

Background : Resource bundles contain key/value pairs for specific locales and are used for internalization. Go here for more details.

Note that Jahia finds the .properties file associated to a given bundle identifier by doing a lookup in resourcebundles_config.xml located in \WEB-IN\etc\config. The resourcebundles_config.xml file is generated automatically during template deployment. For example, given the the following resourcebundles_config.xml:


<?xml version="1.0" encoding="UTF-8" ?>
 <registry>
       <resource-bundle>
           <key>myjahiasite_CORPORATE_PORTAL_TEMPLATES</key>
           <file>jahiatemplates.Corporate_portal_templates</file>
       </resource-bundle>
</registry>

Then given a bundle identifier of myjahiasite_CORPORATE_PORTAL_TEMPLATES, the key/value lookup will be in Corporate_portal_templates.properties (located in directory \WEB-INF\classes\jahiatemplates) for the default language; or for example in Corporate_portal_templates_de.propreties if the current user's locale is German.

Example :

<content:resourceBundle resourceBundle="jahiatemplates.acme_templates" resourceName="search"/>


Tag Information
Tag Classorg.jahia.taglibs.resourcebundle.ResourceBundleTag
TagExtraInfo ClassNone
Body Contentempty
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
resourceBundletruetruejava.lang.Stringthe resource bundle identifier.

resourceNamefalsetruejava.lang.Stringthe key of the resource to fetch in the resource bundle.

defaultValuefalsetruejava.lang.Stringthe value to use if the resource couldn't be accessed.

such as if the resourceBundle doesn't exist, couldn't be read or the resource key entry couldn't be found.

localeLanguagefalsetruejava.lang.StringNo Description
localeCountryfalsetruejava.lang.StringNo Description
localeVariantfalsetruejava.lang.StringThe variant argument is a vendor or browser-specific code.

For example, use WIN for Windows, MAC for Macintosh, and POSIX for POSIX. See java.util.Locale for more info.

namefalsetruejava.lang.Stringthe name of the pageContext attribute which contains the resourceName to fetch (i.e. the key of the resource to fetch in the resource bundle).

namePostFixfalsetruejava.lang.Stringthe string to append at the end of the 'name' attribute before it is looked up in the resource bundle.

Format of generated resource key : name + namePostFix


Variables
No Variables Defined.


Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.