Multilingual Content - Documentation topics on: multilingual content,.

Multilingual Content

Multiple languages are fully supported in dotCMS.  Back-end users can contribute the same content in multiple languages and front end users may choose to view content in the supported languages.  To add another language to a piece of content, click the "Add New Language" button under the "CMS Admin" tab.

Enter the two character "Language Code" and "Country Code" and then fill out the complete descriptive name of the Language and Country being represented as in the image below.

After saving the new language users will be able to open, search for, or create a piece of content of any Content Type in the new language by clicking on the new language flag icon that is now displayed.  When adding or editing content, simply click on the select box provided by the "Language" field to enter content in a particular language.

The initial dotCMS configuration specifies English as the default language. However the default language can be changed to any language by editing the default language properties (DEFAULT_LANGUAGE_COUNTRY, DEFAULT_LANGUAGE, DEFAULT_LANGUAGE_CODE, DEFAULT_LANGUAGE_STR, and DEFAULT_LANGUAGE_COUNTRY_CODE) in the file. Note: It is strongly recommended that changes to this file be made through a ROOT folder plugin.

After adding the new language, click on the content tab and make sure that the new language has been added to the language filter field in the content search area.

To add a new version of any content in the new language, open the content from the Content Search tab and select the language from the language dropdown in the top left corner, as shown below.

The first time you create a version of content in a new language, you'll be prompted to choose if you want to populate the content from the existing content in another language.

All of the content on a particular page can be previewed by language while editing an HTML page in edit mode as shown in the image below.

For a multi-lingual page with static content to display in different languages, there must be a separate version of the page for each language. However dynamic pages can (and should) be built to pull a default language version of content if there is not a version of the content that matches the front end user's language choice on a particular page.

In addition, dotCMS can be configured to automatically display the a version of pages and content in a default language if versions do not exist in the current display language. For more information on configuring dotCMS to pull default language versions of content and pages see the Page Language Configuration, Content Language Configuration, and Widgets in Multilingual Sites documentation.