By definition, a dictionary is “a reference book containing an alphabetical list of words with information about them,” as defined by the Princeton Wordnet dictionary. This holds true even in the world of Umbraco. The following sections describe how to work with dictionaries and why you would want to use them in the first place.

A dictionary in the context of Umbraco is a way for you to support multi-lingual labels and portions of text while maintaining these values in a common place. For example, if you needed to translate all the items in your top website navigation, you can use Umbraco dictionary entries to define how each item displays depending on the user's chosen language. The sections that follow show you how to implement this flexibility using the Umbraco backoffice.

The Umbraco Approach

The use of dictionaries has two distinct applications in the realm of Umbraco:

  • For translations in a multi-lingual website
  • To implement acronyms or other items that may be constants throughout the content of your site

The former is probably the most common use for an Umbraco dictionary. What does using one do for you as an author, editor, or administrator? It enables you to set a dictionary key and apply values to this key on a per-language basis. Figure 6-2 shows an example of this usage. In this case, you can see a dictionary item called SiteName, which is translated in both English (United States) and French.

Similarly, as described in the second bullet, if you use a ...

Get Umbraco User's Guide now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.