Kentico: Multilingual: Setup
In this article you’ll find:
Goal
The purpose of this article is to provide an easy step-by-step guide to help you configure the multilingual functionality.
Prerequisite
Configured connector - Kentico: System Settings Setup
Indexing API Overview - Kentico: Indexing API Overview
File Export Overview - Kentico: File Export overview
Introduction to multilingual functionality - Kentico: Multilingual Overview
Steps to set up the multilingual functionality
From the application selector side menu (F2 or button top left) choose the Settings application.
Go to Integration / Hawksearch where you’ll find the settings for the connector.
Go to the Indexing settings category and enable Multilingual indexing enabled.
If using File Export indexing, create an attribute mapping with the Hawksearch field name “language” and Destination field name “DocumentCulture”. Do this for each page type you’d want to be indexed. The data is taken from the CMS_Document database table.
Re-index your index - Kentico: Indexing API Overview .
Workbench changes
Visitor Targets
Something very important that needs to be done in order for the indexing functionality to work is to add Visitor Targets for each language you want to use.
Navigate to the Engine → Workbench → Merchandising → Visitor Targets
Add a corresponding visitor target for each language of your choice. Keep in mind that the language fields will be sent in the form of a culture code which can be found in the CMS_Culture table in the database. For example for English the language field will state “en-us” while for Spanish it will be “es-es”. If uncertain of the format, check the CMS_Culture table for exact codes.
Visibility Rules
Another thing that needs to be done is to add corresponding Visibility Rules for each language which filters out the documents of that language when the Visitor Target isn’t met.
Navigate to the Engine → Workbench → Merchandising → Visibility Rules
2. Click on Conditional Rules
3. Click Add Rule.
4. Fill out the rule for each language like so.
What this essentially does is hide all documents which have the language value en-us whenever the English Visitor Target we created earlier isn’t met. When you chain those rules for each language, at the end you are left only with the documents for the language that was sent to Hawksearch via the widgets.