Resource Bundles

Resource Bundles add a common method of internationalization to Mura.

By default a site's resource bundles are located at {siteid}/includes/resourceBundles/. They follow a strict naming convention that matched the languages language and region values.

Syntax

Example:

If Mura cannot find a direct language and region match it will look for just a language match.

Example:

Example:

Custom Keys

If you have custom keys that you would like to deploy as part of a theme you can deploy them in a resource bundle file within your site's theme directory ({siteid}/includes/themes/{theme}/resourceBundles). You only need to add keys that are unique to your theme. All other key values will come from the default resource bundles ({siteid}/includes/resourceBundles).

For example, if your theme required a key named myCustomString and your site was using the default English resource bundle you would create a file name en.properties in your {siteID}/includes/themes/{theme}/resourceBundles directory with the following content:

You could then reload Mura and have access to that key.

As a shortcut, you can also directly pull keys from an instance of the Mura Scope.

Lookup Hierarchy

Mura has a strict look-up hierarchy that allows you to both organize your resource bundles and override base settings:

  1. /{SiteID}/includes/themes/{theme}/resourceBundles/{targetResourceBundle}
  2. /{SiteID}/includes/resourceBundles/{targetResourceBundle}
  3. /requirements/mura/resourceBundles/resources/{targetResourceBundle}