Kentico CMS 7.0 Developer's Guide

Selecting default languages for visitors

Selecting default languages for visitors

Previous topic Next topic Mail us feedback on this topic!  

Selecting default languages for visitors

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

You can configure which language version the system displays to users when they arrive on the website.

 

Configuration for registered users

 

The website culture displayed to registered website users depends on each user's Preferred content culture setting. Users themselves can change this setting in CMS Desk -> My desk -> My profile, or on the live site by means of the My account web part. Website administrators can adjust these settings in Site Manager -> Administration -> Users -> edit (Edit) -> General.

 

Depending on this configuration, the user will either see the content in their preferred culture (if available), or in the website's default content culture (if set to (default) or if the preferred culture is not available).

 

Please note that the act of logging in does not change the current culture, so this setting only has an effect if users are already logged in when they first reach the website (e.g. when using Windows authentication).

 

Configuration for anonymous visitors

 

It is also possible to configure the default content culture displayed to anonymous visitors of the website. This can be done separately for the main website domain and for individual domain aliases:

 

Site Manager -> Sites -> edit (Edit) site -> General -> Visitor culture - used for visitors accessing the website through a URL containing the main domain name.

Site Manager -> Sites -> edit (Edit) site -> Domain Aliases -> edit (Edit) alias -> Visitor culture - used for visitors accessing the website through a URL that contains the respective domain alias.

 

The values can either be set to one of the cultures available for the website, or to (Automatic), in which case the user's browser settings are used (for example, in Internet Explorer, you can set the default language in Tools -> Internet options -> General -> Languages).

 

Setting the default language for specific domains

 

Using the Visitor culture settings of the site and its domain aliases (described in the section above), you can configure the system to use a different default language based on the current domain. For example, if you use the following domains:

 

example.com (main domain)

example.de (domain alias)

example.fr (domain alias)

 

You can set English, German and French as the default cultures for the domain and domain aliases (respectively). Now, when a visitor arrives at example.fr, the website automatically displays its French content. Refer to the Languages and URLs topic for additional information about cultures, domains and URLs.