This article explains how you can configure localised keywords, i.e. how to use different fields as the keywords field depending on the selected user interface language. This function is available in Flex 32.11 or later.
By default, the “keywords” field is used as the source to display keywords on the preview pages. New searches can be started by clicking keywords, by using drag & drop to search for more than keyword, or by use of check boxes in front of the keywords. You can configure how and where you want to display keywords via Site configuration > Preview page settings > Keywords.
If you are using a custom preview template or modal preview template, then you configure how and where the keywords appear by changing the template. Scroll down to see an example:
You can configure different fields to be used as the keyword field in the metadata repository (Site configuration > Metadata repository). Although you can use any field as keyword field, it is recommended to use only ‘Keywords’, ‘Category’ or ‘Subcategory’ for this purpose. And to use ‘Keywords’ for the primary locale (usually English).
Below is an example for a website that uses ‘Keywords’ for English keywords, and ‘Subcategory’ for German keywords.
1) Go to Site configuration > Metadata repository and click on the row for field ‘Keywords’ to open the properties dialog. Enter the field labels and select ‘English’ in the locale drop down box to make this field appear only if the UI language is English.
Check the box ‘Contains comma separated values’ and then save the properties.
2) Next, click on the row ‘Subcategory’ and make the changes as described above, but select ‘German’ in the drop down box.
3) When you are done, click on the ‘Previews’ button in the toolbar above the fields list and make sure that both ‘Keywords’ and ‘Subcategory’ are in the box on the left. If not, then drag those fields from the box on the right into the ‘Visible’ box on the left and save your changes.
4) Finally, click on the button ‘Commit changes’ in the toolbar to recycle the repository cache and to make the new settings active.
5) Click on ‘Preview page settings’ in the side bar and then open the section ‘Keywords’.
6) Tick the box ‘Localised keywords’.
7) There are two boxes for the ‘Keywords fields’ setting. The box on the left must have the fields that you have just configured in the previous step, so for this example only ‘Keywords’ and ‘Subcategory’. If there are other fields in the box, then remove those by dragging the fields to the box on the right.
Note that if ‘Localised keywords’ is off, you can use this setting to combine the values from multiple fields to display as a single source. if ‘Localised keywords’ is on however, then you can use only one field for each locale/language.
8) Finally, save the settings with the button at the bottom of the page.
Note that the fields that you have configured to be used for localised keywords output, are automatically removed from the metadata fields output. E.g. if the fields ‘Keywords’ and ‘Subcategory’ are in the list that you configured at step 7 (above), then those fields will not appear as metadata field. This is also true if you use the below tag in your custom template. So, all fields that are configured to display on the preview pages (for the configured locales) will appear, but the ones that are configured to be output as ‘Keywords’ are removed.
Template example html for outputting the keywords
The include file ‘previewcflex\keywords0.inc’ is used to output the HTML for draggable keywords.
For detailed information, read the article Custom preview pages and modal previews.