A number of system properties define and control how dotCMS displays and handles content in different languages.
Each system must define a default language. The default language is configured in the dotmarketing-config.properties file, via the following properties:
CHARSET = text/html;charset=UTF-8 DEFAULT_LANGUAGE_COUNTRY = United States DEFAULT_LANGUAGE = en_US DEFAULT_LANGUAGE_CODE = en DEFAULT_LANGUAGE_STR = English DEFAULT_LANGUAGE_COUNTRY_CODE = US
The standard dotCMS distribution ships with the default language and the values of all these properties set for U.S. English (as in the property values shown above).
Changing the Default Language
To change the default language, you must change all of these properties to appropriate values for your location and language.
If you change the default language after you have already created your site and content, the language of your site and content will not be changed, and will not use the new Default Language. If you need to change the Default Language after you have already created your Site and content, please contact dotCMS support for assistance.
Where applicable, dotCMS adheres to appropriate ISO standards for country codes and language codes. Specifically:
DEFAULT_LANGUAGE_CODEproperty is expected to contain a value defined by ISO standard 639-1.
DEFAULT_LANGUAGE_COUNTRY_CODEproperty is expected to contain a value defined by ISO standard 3166-1 (Alpha-2).
DEFAULT_LANGUAGEproperty is expected to contain a value equal to the value of the DEFAULT_LANGUAGE_CODE, followed by an underscore (_), followed by the value of the DEFAULT_LANGUAGE_COUNTRY_CODE.
The values of the
DEFAULT_LANGUAGE_STR properties are not expected to conform to any standards, and may include country and language names in any language.
Property File Refresh Frequency
The Language Properties files provide translations of common terms in several languages, which can be used to aid in translating forms, and which are used to translate the dotCMS back-end interface into different languages. By default, dotCMS re-reads the language properties files once every five minutes. To increase or decrease this frequency, modify the LANGUAGES_REFRESH_INTERVAL with the new frequency (in minutes).
For more information on the language properties files, see the Multilingual Forms documentation.
Multilingual Content Pulls
Several additional properties determine how dotCMS behaves when a user attempts to display Pages or Content, but no version of the content exists in the user's display language. For more information see the Multilingual Content Pulls documentation.