Kentico Cultures Demystified

Posted by: admin | Technical | 04.11.2009

The Kentico CMS Devel­op­ers Guide provides good infor­ma­tion on how to config­ure a multi­lin­gual site, however it does not seem to provide a quick refer­ence on how to set up and config­ure the default User Inter­face (UI) and content cultures in one document.

Culture Options – UI and Content Cultures

The Admin­is­tra­tion > Users section allows the setting of the Preferred content culture and the Preferred user inter­face culture. These values normally set at (default) but what does all this actu­ally mean?

It is recom­mended to not explic­itly set the culture for users and to let the defaults be used. Unless a user explic­itly wishes to over­ride, assum­ing this culture is supported.

Content Culture

Content cultures deter­mine the actual content culture stored against Kentico docu­ments as they are saved. If you have a multi­lin­gual site there are multi­ple docu­ments 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 avail­able list of all avail­able content cultures are at Site Manager > Devel­op­ment > 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 docu­ments 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 view­ing if they are logged in.

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

Setting the default visi­tor culture

You can set this in the follow­ing ways:

  • Site Manager > Sites > [Site Instance] > Default visi­tor culture
  • Site Manager > Sites > [Site Instance] > Domain Aliases > [Domain Alias Instance] > Default visi­tor culture

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

For a site with­out multi­lin­gual capa­bil­i­ties 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 differ­ent domain in which case the default visi­tor culture setting would be set to French.

If this is not set, then the user’s browser settings will be used to deter­mine the default visi­tor culture.

It is recom­mended that the default visi­tor 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 partic­u­lar Kentico site. Note that this will affect the selec­table cultures from within the cmsdesk admin­is­tra­tion inter­face for a partic­u­lar website.

It is recom­mended that these values always be explic­itly set when setting up a Kentico instance. If not a multi­lin­gual site allow only a single culture which matches the supported default content culture.

UI Culture

The UI Culture is the culture of the CMSDesk admin­is­tra­tion inter­face. Out of the box (OOTB), Kentico uses en-us (US English).

UI Cultures are stored within Site Manager > Devel­op­ment > UI Cultures. You will see there is an ‘English’ option, but this actu­ally corre­sponds to en-us (US English). If you want to allow users to select between this and UK English for exam­ple 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 inter­face culture’ they will then see the CMS Desk inter­face using the culture defined in the AppSetting.config file for that website (there doesn’t appear to be a corre­spond­ing value within Site Manager). This value should be set to a sensi­ble default to avoid users having to change it them­selves. For a site managed from New Zealand it should be:

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

It is recom­mended that this value always be explic­itly set when setting up a Kentico instance.

Leave a Reply