Default Language Fall-Through Configuration - Documentation topics on: adding languages,default language,languages,multilingual,multilingual content,.

This documentation is a static copy for this version. For current documentation, see: http://dotcms.com/docs/latest

Default Language Fall-Through Configuration

If a user attempts to access content in dotCMS in a particular language, but the content does not exist in the specific language requested, dotCMS may either show the content in the default language or may show nothing (only showing content in the specific language requested). The ability for dotCMS to show content in the default language is called the default language fall-through, and can be configured differently for different types of content.

The fall-through configuration for different content types is specified via several language properties set in the dotmarketing-config.properties file, allowing you to customize the fall-through behavior. The following are the default values of the fall-through properties:

##  if this variable is set true and the contentlet you are looking is not in the language you are on,
##  this will show the contentlet in the default language (Fall-thru to the default language). If is set to false
##  this aditional search is avoided
DEFAULT_CONTENT_TO_DEFAULT_LANGUAGE=false

## it is similar to DEFAULT_CONTENT_TO_DEFAULT_LANGUAGE but only applies for Widgets
DEFAULT_WIDGET_TO_DEFAULT_LANGUAGE=true

## it is similar to DEFAULT_CONTENT_TO_DEFAULT_LANGUAGE but only applies for Pages
DEFAULT_PAGE_TO_DEFAULT_LANGUAGE=true

## it is similar to DEFAULT_CONTENT_TO_DEFAULT_LANGUAGE but only applies for Files
DEFAULT_FILE_TO_DEFAULT_LANGUAGE = true  

So by default, Widgets, Pages, and Files will display in the default language if the requested language version does not exist, but individual content items will not display in the default language if the request language version of the content doesn't exist.

These properties are handled independently. So, for example, with the default configuration, pages are set to fall-though to the default language, but content is not. This means that if a user attempts to acces a page in a language that the page has not been translated to, the default language version of the page will display. However if the content which is displayed on the page has not been translated then the page will be blank (not showing any content), since the content does not exist in the specified language and content is not set to fall-through by default. To change this behavior and ensure that content is always displayed (even if it hasn't been translated yet), change the DEFAULT_CONTENT_TO_DEFAULT_LANGUAGE property to true.