Support and Documentation



This section describes using resource bundles to customize the front end. For information about using resource bundles to customize Brightspot's widgets, dashboard, reports, and other editorial components, see Customizing Brightspot's labels.

You can use resource bundles along with the {{format}} helper to display localized text in published content. This deployment requires a single template, a resource bundle for each locale, and an optional data file.

At runtime, Brightspot displays localized text using the following logic:

  1. Extract the site from the received URL.

  2. Determine the site's locale.

  3. Retrieve the template for the requested item.

  4. Populate the template's helpers using the standard view-model logic. However, when processing {{format}} helpers:

    1. Look up the properties file for the site's locale.

    2. Within the properties file, look up the string to evaluate and return.

The following snippets provide an example for localization with the {{format}} helper. All of the snippets in this example are in the same directory.

  "_template": "AuthorPage.hbs" 1


Provides the name of the corresponding template.

{{!-- File name AuthorPage.hbs --}}
    <h3 class="author-headline">{{format "aboutme"}}</h3> 1


Performs a call to message formatter aboutme in a locale-specific properties file.

The default properties file has a name, and the localized properties file has a name

  • The literal AuthorPage is mandatory because it must match the name of the template.

  • The two letters before .properties must be a language code that Java recognizes. For a list of two-letter language codes, see Codes for the Representation of Names of Languages.

  • Example:

# File name
aboutme=My Recent History

The previous snippet is in a file This is the default properties file for localization. If there is no locale associated with the site, or if there is no properties file for the site's locale, Brightspot renders the output using this file.

# File name
aboutme=Mon Histoire Récente

The previous snippet is in a file When Brightspot detects that the published site's locale is French, it looks up the value for {{format "aboutme"}} in this file.

    <h3 class="author-headline">Mon Histoire Récente</h3>

The previous snippet shows the resulting HTML output for localized text from the {{format"aboutme"}} helper.