Add a new language to system settings
Add a language to system settings
Before you can create a version of an item in a new language, you must add the new language in the Experience Manager system settings. Then the new language code and associated country/region code become available for configuration within Sitecore.
To add a language to system settings:
-
In the Content Editor, go to /sitecore/System/Languages.
-
Right-click and then click Insert, Language.
-
In the Add a New Language dialog box, in the Choose a predefined language code field, select the language and country code you want to use.
-
Complete the remaining fields as required and click Next to step through the remaining pages of the wizard.
-
When you are finished, click Close.
The new language is added to the content tree.
Add a custom language
The system supports all the languages available in the .NET CultureInfo
class. If you want to add a language that is not available in the default cultures, you first register a custom culture, then add it to the LanguageDefinitions.config
file to make it available in the system settings.
When you add a new language in Sitecore system settings, the languages available in the drop-down menu of the Add a New Language dialog are determined by the list of languages in the LanguageDefinitions.config
file. However, you also have the option of typing in the language manually in the system settings.
-
Register a custom .NET culture by creating a simple console application, as explained in Microsoft documentation.
-
Run the application once on each Sitecore environment server.
-
Open the language config file under
\App_Config\LanguageDefinitions.config
. -
Add the language in the following format. The language definition must match the .NET custom culture.
RequestResponse<language id="pt" region="MX" codepage="65001" encoding="utf-8" charset="iso-XXXX" icon="flags/16x16/flag_Mexic.PNG" />
-
In the Content Editor, go to /sitecore/System/Languages.
-
Right-click and then click Insert, Language.
-
If you added the language to the config file, in the Add a New Language dialog box, in the Choose a predefined language code field, select the language and country code you want to use. Alternatively, type the language code manually. In both cases, the language code must match the registered custom culture.
-
Complete the remaining fields as required and click Next to step through the remaining pages of the wizard.
-
When you are finished, click Close. The new language is added to the content tree.