Tailwind Logo

Manage content in multiple languages

XM Cloud

Published: 2023-12-03

Like Sitecore's CMS, XM Cloud also allows for content management in multiple languages. In this article, we will introduce the configuration of the CMS side.

Add content language

When the sample XM Cloud site is launched, it holds only English resources, as shown below.

multilang01.png

Languages can be added by adding items to the /sitecore/system/Languages path.

multilang02.png

When you click on the Language button, the following dialog box appears. The screen shows that Japanese has already been selected.

multilang03.png

After adding the language, go to the Home item and you will see that Japanese has been added.

multilang04.png

It is now possible to handle Japanese data.

Content Verification

For Basic Site data, please create Japanese data for items related to Home and About as site items. Also, for the site's partial design, prepare Japanese resources for the header and footer, which are also available.

When you are ready, launch the experience editor, switch languages, and check to see if it displays correctly.

multilang05.gif

Reflects the cloud environment

In this case, we have created content in our local environment. To apply this to the XM Cloud environment, we will perform serialization.

PowerShell
sitecore dotnet ser pull -n default

You will see that several items have been updated as follows

multilang06.png

The following commands are used to reflect the item data.

PowerShell
sitecore dotnet ser push -n staging

As a result of the reflection, we were able to confirm that Japanese is also displayed in Pages.

multilang07.png

Summary

This time, we added languages and confirmed that the Experience Editor can switch between and display data in multiple languages. We also reflected the data in the cloud environment and finally confirmed that Pages can also manage content in multiple languages.

Tags