Dashboard > RIFE > ... > Templates > Type-specific default resource bundles
RIFE Log In | Sign Up   View a printable version of the current page.
Type-specific default resource bundles


Added by Geert Bevin, last edited by Geert Bevin on May 22, 2004
Labels: 
(None)

When localizing an application, it's common practice to use a few resourcebundles that are shared by the whole application. Since it's tedious to have to explicitely add them to all the templates that are instantiated, and since sometimes templates are automatically instantiated by reusable elements, it's handy to be able to setup a collection of default resource bundles.

You set this up in your configuration file and it's specific for each template factory type. The latter is important since it makes no sense to add content resource bundles to all SQL templates or Java templates.

For example:

<list name="TEMPLATE_DEFAULT_RESOURCEBUNDLES_ENGINEHTML">
    <item>l10n/graphics</item>
    <item>l10n/text</item>
</list>

will result in executing the following Java code after the instantiation of each enginehtml (the standard type) template:

template.addResourceBundle(Localization.getResourceBundle("l10n/graphics"));
template.addResourceBundle(Localization.getResourceBundle("l10n/text"));



Are you enjoying Confluence? Please consider purchasing it today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.2.1a Build:#515 May 19, 2006) - Bug/feature request - Contact Administrators