Kentico CMS 6.0 Developer's Guide

Configuring multilingual content

Configuring multilingual content

Previous topic Next topic Mail us feedback on this topic!  

Configuring multilingual content

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

This chapter explains how to configure a website to display content in multiple languages.

 

Default content culture

 

When you create a new website, its default culture is the culture you specify in Step 2 of the New site wizard. If you create a website based on a web template, it uses the culture of the web template. All default Kentico CMS web templates use English - United States as their default culture.

 

Default culture settings can be modified in the following sections of the user interface:

 

Site Manager -> Settings -> Content -> Default content culture

Site Manager -> Sites -> edit (Edit) -> Default content culture

 

The two settings are interlinked, i.e. values configured at one section are reflected in the other one.

 

Configuring multilingual content

 

In the following example, you can learn how to add extra language versions to the sample Corporate Site:

 

1. Go to Site Manager -> Sites and click the Edit site (Edit) icon next to the Corporate Site. Go to the Cultures tab. Click the Add cultures button and add the following cultures: French - France and German - Germany.
 
devguide_clip0362
 

2. Switch to CMS Desk. You can see there's a new section with language selection in the main toolbar. Using this toolbar, you can switch between particular language versions of the currently selected document. You can also click the Compare (Compare) button to switch to Language versions comparison mode and edit language versions side-by-side.
 
devguide_clip0363
 

3. Click the root document and choose the French culture. Since the French version of the document doesn't exist yet, you're offered with two options:

 

Create empty document - creates a new document of the same type without any content.

Copy content from another language - creates a new document of the same type and copies its content from another language version.
 

Choose to copy content from the English version and click Create document:

 
devguide_clip0364
 

4. You are redirected to the editing form of the new version. The root cannot have any name, so the box is now disabled. Click Save. The new document culture version is created.
 
devguide_clip0365
 

5. Now repeat the same for the Home page. On the editing form, change the document name to French Home. Click Save.
 
devguide_clip0366

 

6. Change the heading text to "Welcome to the French version of the Sample Corporate Site". Click Save.

 
devguide_clip0367
 

7. Sign out. Now, you can see the live site in French version:
 
devguide_clip0368
 

8. You can switch between languages using the language selection links at the top right of the website header. They are displayed automatically using the Language selection web part.
 

9. Now sign in as administrator to Site Manager and go to Settings -> Content. Choose the Corporate Site in the drop-down list and set the value Combine with default culture to true. Click Save. Sign out and see the French version of the live website now. As you can see, the documents that are not translated to French are now displayed in the default culture (English).
 
devguide_clip0369

 

 

 

Creating content for another language version

 

Every time you create content for another language version, please be sure you create language versions for at least the root document and the home page. Otherwise, the website will not be displayed correctly.

 

The documents that are not translated yet are displayed with a cross (NotTranslated_flag) icon on the right so that you know which of them need to be translated.