Optimizely: XTM.config file

Introduction

Once you have configured your instance of XTM Connect – Optimizely, you can make other settings, in the Optimizely CMS, which will affect the translation process in XTM Cloud. You do so in the XTM.config file. This file is located in the main folder in the project in which your XTM Connect.Optimizely.NuGet package has been installed.

For example, in the case of Linux installations, the path to the file might be as follows: /opt/Foundation/src/Foundation/bin/Debug/net6.0/XTM.config.

IMPORTANT!

The exact location of the XTM.config file might vary from environment to environment, depending on the structure of a particular Optimizely instance.


File contents

In the XTM.config file, you can configure several things. These are sample XTM.config file contents:

<?xml version="1.0" encoding="utf-8" ?> <XTMSettings xmlns:xsd="http://www.w3.org/2001/XMKSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <LanguageMaps> <LanguageMap key="en" value="en-GB" /> <LanguageMap key="es" value="es-ES" /> <LanguageMap key="de" value="de-DE" /> <LanguageMap key="pl" value="pl-PL" /> <LanguageMap key="fr" value="fr-FR" /> </LanguageMaps> <ContentConfiguration> <ExcludeContent value="" /> </ContentConfiguration> <CallbackConfiguration> <CallbackCredentials login="xtmcallback" password="/PASSWORD/" /> </CallbackConfiguration> <ProjectConfiguration> <IllegalProjectNameASCIIChar value="&#34;" /> <IllegalProjectNameASCIIChar value="&#42;" /> <IllegalProjectNameASCIIChar value="&#47;" /> <IllegalProjectNameASCIIChar value="&#58;" /> <IllegalProjectNameASCIIChar value="&#60;" /> <IllegalProjectNameASCIIChar value="&#62;" /> <IllegalProjectNameASCIIChar value="&#63;" /> <IllegalProjectNameASCIIChar value="&#92;" /> <IllegalProjectNameASCIIChar value="&#123;" /> <IllegalProjectNameASCIIChar value="&#124;" /> <IllegalProjectNameASCIIChar value="&#125;" /> <ReplacingChar value ="_" /> </ProjectConfiguration> </XTMSettings>
  • <LanguageMaps> → Define your language mappings between Optimizely CMS and XTM Cloud languages here (see Optimizely: What determines which language combinations are present in an XTM Cloud project? to learn more about language mapping).

  • <ContentConfiguration> → Specify which content blocks are to be excluded from translation here.

  • <CallbackConfiguration> → Configure authentication options for the XTM Cloud callbacks that are sent to the Optimizely CMS here.

For callbacks to work properly, the Enable automatic import checkbox must be selected in the connector configuration (XTM Connect → Settings → XTM Admin ToolSettings).

  • <ProjectConfiguration> → In this element:

    • Use the IllegalProjectNameASCIIChar attribute to define illegal (invalid) characters for project names.

    • Use the ReplacingChar attribute to specify which characters are to be used, to replace illegal characters.

IMPORTANT!

Note that, for any changes made to the XTM.config file to be effective, you need to restart your Optimizely CMS.