Customizing Brightspot’s Labels

Some of Brightspot’s labels are in configuration files. For example, the configuration file SiteDefault_en.properties provides labels appearing in the Sites widget.

Configuration file for labels in Sites widget
displayName=Site
global=Global
action.switch=Switch

Brightspot uses the labels when rendering the Sites widget, as described in the following illustration.

../../../_images/site-properties-labels.svg

Each configuration file’s name contains one of the following:

  • A code indicating a language and region
  • A code indicating only a language
  • Neither language nor region code

The following table illustrates file names and the associated language and region.

Language and region codes in file names
File name Language code Region code Language Region
SiteDefault_en_GB.properties en GB English United Kingdom
SiteDefault_en.properties en N/A English N/A
SiteDefault_es_MX.properties es MX Spanish Mexico
SiteDefault_es.properties es N/A Spanish N/A

For a list of language and region codes, see ISO-3166 Country Codes and ISO-639 Language Codes.

Brightspot retrieves labels based on an editor’s locale.

  • If an editor selected a locale English (United States), then Brightspot retrieves the labels for the Sites widget using the following priority:
    1. From the file SiteDefault_en_US.properties. If that file does not exist,
    2. From the file SiteDefault_en.properties. If that file does not exist,
    3. From the Brightspot defaults (which are US English).
  • If an editor selected a locale Spanish (Mexico), then Brightspot retrieves the labels for the Sites widget using the following priority:
    1. From the file SiteDefault_es_MX.properties. If that file does not exist,
    2. From the file SiteDefault_es.properties. If that file does not exist,
    3. From the Brightspot defaults (which are US English).

(For information about setting a user’s locale, see Creating Users.)

You can override the labels appearing in the configuration files to customize the Brightspot experience to your organization’s needs (and personality).

To customize labels

  1. Acquire from your Brightspot developer the path and name of the file you want to override. Examples of these files are as follows:

    • com/psddev/cms/db/SiteDefault_en_US.properties
    • com/psddev/cms/tool/content/SitesWidgetDefault_en.properties
  2. Inside the file, identify the label you want to customize.

  3. From the Navigation menu, select Admin > Sites & Settings.

  4. In the Sites widget, click Global. The Edit Global widget appears.

  5. Under Main, expand UI.

  6. Under Localization Bundles, click add_circle_outline. A form appears.

    ../../../_images/localization-locale.png
  7. From the Locale list, select the language and region whose labels you want to customize. The language corresponds to the two-letter code in the file name (for examples, see the table Language and region codes in file names).

  8. Under Localizations, click add_circle_outline. A form appears.

    ../../../_images/localization-item.png
  9. In the Name field, enter the path and filename from step 1 until the word Default. For example, if the developer gave you a path and filename com/psddev/cms/db/SiteDefault_en.properties, enter com/psddev/cms/db/Site.

  10. Under Entries, click add_circle_outline. A form appears.

    ../../../_images/localization-entry.png
  11. In the Key field, enter the key corresponding to the label you want to customize. Referring to the snippet Configuration file for labels in Sites widget, enter one of the following keys: displayName, global, or action.switch.

  12. Repeat steps 10–11 to customize additional labels in the configuration file.

  13. Repeat steps 8–12 to customize labels in other configuration files for the current locale.

  14. Repeat steps 6–13 to customize labels for other locales.

  15. Click Save.

When an editor uses the locale you selected in step 7, Brightspot retrieves the label from the override you entered.

../../../_images/site-properties-labels-override.png