Kentico Cultures Demystified

Posted by: | Technical | 04.11.2009

The Kentico CMS Developers Guide provides good information on how to configure a multilingual site, however it does not seem to provide a quick reference on how to set up and configure the default User Interface (UI) and content cultures in one document.

Culture Options – UI and Content Cultures

The Administration > Users section allows the setting of the Preferred content culture and the Preferred user interface culture. These values normally set at (default) but what does all this actually mean?

It is recommended to not explicitly set the culture for users and to let the defaults be used. Unless a user explicitly wishes to override, assuming this culture is supported.

Content Culture

Content cultures determine the actual content culture stored against Kentico documents as they are saved. If you have a multilingual site there are multiple documents stored for each culture against a single ‘node’.

N.B There is always a default content culture for a Kentico site.

List of all content cultures

The available list of all available content cultures are at Site Manager > Development > Cultures. All major cultures are provided here and you shouldn’t need to modify this list.

Setting the default content culture

You can set this in two ways (both have the same effect).

  • Site Manager > Sites > [Site Instance] > Default content culture
  • Site Manager -> Settings -> (select site) -> Web site -> Default culture of the content

What this means is that the default culture for all documents will be this value (e.g. en-NZ). If a user has (default) saved against their ‘Preferred content culture’ they will then see the default content culture for the Site they are viewing if they are logged in.

The default content culture should be set first in any Kentico implementation.

Setting the default visitor culture

You can set this in the following ways:

  • Site Manager > Sites > [Site Instance] > Default visitor culture
  • Site Manager > Sites > [Site Instance] > Domain Aliases > [Domain Alias Instance] > Default visitor culture

What this means is, if a user comes to the site anonymously, this is the culture that will be used by default to display to visitors and this can be managed on a domain alias level also.

For a site without multilingual capabilities it would normally be the same as the default content culture, but one may wish to have a French version of a site under a different domain in which case the default visitor culture setting would be set to French.

If this is not set, then the user’s browser settings will be used to determine the default visitor culture.

It is recommended that the default visitor culture always be set to match the default content culture by default.

Site manage > Sites > [Site Instance] > Cultures

This section allows you to set all the cultures that are being supported for a particular Kentico site. Note that this will affect the selectable cultures from within the cmsdesk administration interface for a particular website.

It is recommended that these values always be explicitly set when setting up a Kentico instance. If not a multilingual site allow only a single culture which matches the supported default content culture.

UI Culture

The UI Culture is the culture of the CMSDesk administration interface. Out of the box (OOTB), Kentico uses en-us (US English).

UI Cultures are stored within Site Manager > Development > UI Cultures. You will see there is an ‘English’ option, but this actually corresponds to en-us (US English). If you want to allow users to select between this and UK English for example within CMSDesk you should create a new UI Culture called English (NZ) and set the code to en-NZ.

If a user has (default) saved against their ‘Preferred user interface culture’ they will then see the CMS Desk interface using the culture defined in the AppSetting.config file for that website (there doesn’t appear to be a corresponding value within Site Manager). This value should be set to a sensible default to avoid users having to change it themselves. For a site managed from New Zealand it should be:

<add key=”CMSDefaultUICulture” value=”en-NZ”/>

It is recommended that this value always be explicitly set when setting up a Kentico instance.

Leave a Reply