Custom Factories
You can also easily create custom resource bundle factories.
customResourceBundleDirectory = ExpandPath('#$.globalConfig('context')#/path/to/your/resourceBundles/');
customFactory = new mura.resourceBundle.resourceBundleFactory(
parentFactory = $.siteConfig('rbFactory')
, resourceDirectory = customResourceBundleDirectory
, local = $.siteConfig('JavaLocale')
);
At this point the custom factory would have the following look up hierarchy:
- {customResourceBundleDirectory}/{targetResourceBundle}
- /{siteID}/includes/themes/{theme}/resourceBundles/{targetResourceBundle}
- /{siteID}/includes/resourceBundles/{targetResourceBundle}
- /requirements/mura/resourceBundles/resources/{targetResourceBundle}
Then, wherever you want to output your custom resource bundle keys, simply access your customFactory:
#customFactory.getKey('yourKey')#