Add a new language to system settings
Add a predefined language
Before you can create a version of an item or site in a new language, you must add the new language to your XM Cloud environment. A language in XM Cloud indicates both language and country or region, for example, en-au or English (Australia). You can select a predefined language or add a custom language.
To add a predefined 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
To target a more specific audience, you can add a custom language by combining an ISO language code with any country/region code. You can also add a custom language with a nonstandard country/region code, for example, en-EU
. For information on supported languages, see Microsoft's CultureInfo documentation.
To add a new custom 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 Language field, enter the language you want to use.
-
In the Country/region code field, enter the country code you want to use.
-
Click Next to step through the remaining pages of the Wizard and leave all other fields with their default values.
-
When you are finished, click Close. The new language is added to the content tree.
-
Click the new language to open its content area. In the Custom Culture section, in the Base ISO Culture Code field, enter the language code you want to use as the base for your new language.
For example, if you want your new language to use the same writing system, calendar, and date format as American English, enter
en-US
. -
If you are using a nonstandard country/region code, in the Fallback Region Display Name field, enter the region name you want to display.
-
Click Save.
Add a custom language with a custom culture
Sitecore 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.
To add a new custom language with a custom culture:
-
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.