|
||
The intranet portal can be multilingual, i.e. both the content of the front-end website and the resource strings in the administration interface can be displayed in various languages, based on the current user's preferences. This topic will give you a basic overview of how this configuration can be achieved. For a full reference on the multilingual possibilities of Kentico CMS, please refer to Developer's Guide -> Development -> Multilingual and international support.
If you want to make the portal's content multilingual, the first thing to do is to add the required cultures in Site Manager -> Sites -> edit () the site -> Cultures. By default, the portal only uses the English - United States culture. You can add additional cultures using the Add cultures button, which opens a culture selection dialog where all cultures defined in Site Manager -> Development -> Cultures will be offered. Unwanted cultures can be removed from the list by checking their check-boxes and clicking the Remove selected button.
Once you have more than one culture in the list, the Language toolbar is displayed in CMS Desk -> Content. Using this toolbar, you can switch between particular language versions of the document currently selected in the content tree.
On the live site, you can switch between particular language versions of the website using the Lanugage selection or Language selection with flags web part. On the Intranet Portal website, the second mentioned web part is located in the top right corner of the master page header.
User interface cultures can be managed in Site Manger -> Development -> UI cultures. In this part of the administration interface, you can see a list of all user interface cultures currently available in the system. The default installation of Kentico CMS only contains the English, Czech and Slovak cultures. Localization packs containing other cultures can be downloaded for free at http://www.kentico.com/Download/Localization-Packs.aspx.
It is also possible to create a completely new user interface culture using the New UI culture link on this page. If you click the Edit () button next to a culture, you open its editing interface where you can define custom resource strings. It is also possible to remove listed cultures using the Delete () button.
Each user has the following two properties on the General tab of their editing interface in Site Manager -> Administration -> Users:
•Preferred content culture - preferred culture of website content displayed to the user. If set to (default) or if the selected culture is not available, content is displayed in the default website culture.
•Preferred user interface culture - preferred culture of the system's administration interface displayed to the user. If set to (default) or if the selected culture is not available, user interface is displayed in the default user interface culture.
Users with access to CMS Desk can adjust these settings for their own accounts in My desk -> Account -> Details.
When setting up a multilingual intranet, it is necessary to choose default cultures. These cultures are used when the two preferred culture settings described above are set to (default), or when the user's preferred culture is not available. These settings need to be adjusted separately for the website content and for the administration interface.
Default content culture can be configured in Site Manager -> Sites -> edit the site -> General. The following two settings on this tab are related to default cultures:
•Default content culture - content culture displayed to registered users whose Preferred content culture is set to (default).
•Default visitor culture - content culture displayed to anonymous site visitors. If set to (Automatic), the culture will be used based on client browser preferences.
The Default content culture option above is linked with the Default content culture setting in Site Manager -> Settings -> Content. If you change the value here with the correct website selected, it gets changed in the dialog described above too, and vice versa.
The default UI culture can be set by adding the following key to the <appSettings> section of your site's web.config file:
<add key="CMSDefaultUICulture" value=”en-nz” /> |
If you use this key, you also need to rename the ~\CMSResources\CMS.resx file to CMS.en-us.resx and the CMS.en-nz.resx file to CMS.resx. This is needed because the CMS.resx file is used when the (default) option in selected in users' Preferred user interface culture. When this key is used and the CMS.resx file contains the en-nz dictionary, for the user who has their Preferred user interface culture set to (default), the UI culture will be en-nz.