Many of my blog posts focus on the features of the Sitecore search platform. Today, I am excited to discuss a crucial capability of Sitecore search, which is its support for multiple languages. Similar to other Sitecore products, Sitecore search is also equipped to handle content in multiple languages, enhancing its versatility and effectiveness in global applications.
In this blog post, I will outline the steps involved in setting up multilanguage support in Sitecore search, highlighting key areas that require careful attention.
Use Case 1: The website supports multiple languages, and similarly, the Search Pages also supports the same languages.
As the use case specifies, we need to enable multi-language support in Sitecore search. Let’s delve into the steps where special attention is required.
Step 1: Login to CEC -> Navigate to ->Administration -> Domain Settings → Locale
Step 2: Click on the Edit button and add the languages supported by your web application. Select the country and languages as demonstrated in the screenshot below.
Step 3: As soon as you add the language and click on the save button, an alert message will appear on the screen, stating, “Make sure to update the locale under your Source Configuration to avoid failure in the scanning process.”
The above message indicates that when you add a language and publish, you should also ensure that this language is added under your source configuration. This is to enable your source to utilize the newly added language effectively.
Step 4: Navigate to the source where you want to utilize these languages and click on the “Available Locales” and click on Edit.
The languages added in Step 3 are available here for selection. As soon as you select a language and save, a new request extractor will be enabled, known as the Language Locale Extractor.
Note —In Sitecore CMS or XM Cloud, the locale is returned with a hyphen “-” (e.g., en-US), whereas in Sitecore Search, it returns an underscore “_” (e.g., en_US). To handle such discrepancies, or if you have any custom logic related to your language code that needs to be implemented, it can be addressed in the Locale Extractor. This tool allows for the necessary adjustments or transformations to ensure consistency across your platforms.
All the above steps are crucial if you are working with more than one language. Only by following these steps can you ensure that your multilingual content gets properly indexed.
Use Case 2: Need to add an attribute which will be used in multiple languages, and it can be used in filters and facets as well.
Step 1: While adding attribute through Domain Settings → Attribute
Please select Locale as the placement option instead of standard if your attribute is going to be used in multiple languages.
Use Case 3: I have facets on my global search pages and other search pages of the website, and I want all facet labels to be in a particular language that can be updated whenever I need to update the text, similar to my CMS content.
Let’s explore how multilingual facet labels can be updated within Sitecore search.
Step 1: Navigate to Administration → Domain Settings -> Feature Configuration -> Facets -> Localization
The above screen will display all available attributes, and here you can update the language-specific labels for each.
In conclusion, effectively managing multilingual content in Sitecore search requires careful attention to details in configuration and setup. By following the steps outlined, such as adding languages, updating source configurations, and ensuring locale consistency, you can enhance the search functionality to cater to diverse linguistic needs. Additionally, the ability to update facet labels in multiple languages directly within Sitecore Search enhances the flexibility and user-friendliness of the platform.