<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">Blog posts by Deepmala S</title><link href="https://world.optimizely.com/blogs/deepmala-s/" /><updated>2026-12-03T07:46:01.0000000Z</updated><id>https://world.optimizely.com/blogs/deepmala-s/</id><generator uri="https://world.optimizely.com/blogs/deepmala-s/" version="2.0">Optimizely World</generator><entry><title>How to Fetch CMP DAM Listing Cards in Optimizely CMS 12 Using GraphQL</title><link href="https://world.optimizely.com/blogs/deepmala-s/dates/2026/12/how-to-fetch-cmp-dam-listing-cards-in-optimizely-cms-12-using-graphql/" /><id>https://world.optimizely.com/blogs/deepmala-s/dates/2026/12/how-to-fetch-cmp-dam-listing-cards-in-optimizely-cms-12-using-graphql/</id><published>2026-12-03T07:46:01.0000000Z</published><updated>2026-12-03T07:46:01.0000000Z</updated><author><name>deepmala.sharma@dxred.com</name></author><category term="Blog post" /><summary type="html">&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;In an existing Optimizely CMS 12 application, listing cards are typically populated using CMS content retrieved through the existing EPiServer Search implementation.&lt;/p&gt;
&lt;p&gt;As part of an enhancement, we needed to extend this functionality to display approved digital assets from &lt;strong&gt;Optimizely Content Marketing Platform (CMP) Digital Asset Management (DAM)&lt;/strong&gt; alongside the existing CMS content.&lt;/p&gt;
&lt;p&gt;Rather than modifying or replacing the existing CMS search implementation, we introduced &lt;strong&gt;Optimizely Graph with GraphQL&lt;/strong&gt; as an additional content retrieval layer for CMP DAM assets.&lt;/p&gt;
&lt;p&gt;This approach allows the application to retrieve CMS content and DAM assets independently, process the results, and combine them into a unified listing experience.&lt;/p&gt;
&lt;p&gt;In this article, we will walk through the architecture, configuration, and implementation steps required to retrieve CMP DAM assets using Optimizely Graph and display them alongside existing CMS listing cards.&lt;/p&gt;
&lt;h2&gt;1. Solution Overview&lt;/h2&gt;
&lt;p&gt;The solution uses two independent content sources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;CMS Content:&lt;/strong&gt; Retrieved through the existing EPiServer Search implementation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CMP DAM Assets:&lt;/strong&gt; Retrieved through Optimizely Graph using GraphQL.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Both result sets are processed independently and combined at the application level before being displayed as listing cards.&lt;/p&gt;
&lt;h3&gt;Architecture Overview&lt;/h3&gt;
&lt;div&gt;
&lt;pre&gt;&lt;code&gt;          CMS Content                  CMP DAM
               |                          |
               v                          v
        Existing CMS Search          Optimizely Graph
               |                          |
               v                          v
          CMS Results                  GraphQL
               |                          |
               |                          v
               |                       DAM Index
               |                          |
               |                          v
               |                      DAM Results
               |                          |
               +------------+-------------+
                            |
                            v
                    Data Mapping
                            |
                            v
                   Unified Listing Model
                            |
                            v
                      Listing Cards
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;The key advantage of this architecture is that the existing CMS search functionality remains unchanged. CMP DAM assets are retrieved separately and merged with CMS results.&lt;/p&gt;
&lt;p&gt;This makes the integration easier to maintain and reduces the impact on existing application functionality.&lt;/p&gt;
&lt;h2&gt;2. Why Use Optimizely Graph?&lt;/h2&gt;
&lt;p&gt;There are different approaches to retrieving CMP DAM metadata. Two possible options are the CMP REST API and Optimizely Graph.&lt;/p&gt;
&lt;h3&gt;Option 1: CMP REST API&lt;/h3&gt;
&lt;p&gt;The CMP REST API can be used to retrieve DAM metadata and asset information.&lt;/p&gt;
&lt;p&gt;However, depending on the API usage limits and request volume, applications may encounter rate-limiting responses such as:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;HTTP 429 – Too Many Requests&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;For high-traffic applications, frequent API requests may introduce additional considerations around rate limits, retry handling, and request management.&lt;/p&gt;
&lt;h3&gt;Option 2: Optimizely Graph&lt;/h3&gt;
&lt;p&gt;Optimizely Graph provides a GraphQL-based approach to querying indexed content.&lt;/p&gt;
&lt;p&gt;For this integration, we use Optimizely Graph as the primary access layer for retrieving CMP DAM metadata.&lt;/p&gt;
&lt;p&gt;Some of its advantages include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;GraphQL-based retrieval:&lt;/strong&gt; Request only the fields required by the application.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flexible queries:&lt;/strong&gt; Build queries based on listing requirements and search criteria.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Efficient metadata retrieval:&lt;/strong&gt; Retrieve relevant asset metadata through GraphQL.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scalability:&lt;/strong&gt; Use an indexed content retrieval layer rather than relying on repeated CMP REST API calls.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Separation of concerns:&lt;/strong&gt; Keep DAM retrieval independent of the existing CMS search implementation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It is important to note that Optimizely Graph does not automatically eliminate all API rate limits. Its actual performance and request limits depend on the configured service and subscription.&lt;/p&gt;
&lt;p&gt;For our implementation, Optimizely Graph provides a suitable approach for retrieving DAM assets independently of the existing CMS search.&lt;/p&gt;
&lt;h2&gt;3. Implementation Steps&lt;/h2&gt;
&lt;h3&gt;Step 1: Request CMP DAM Access&lt;/h3&gt;
&lt;p&gt;The first step is to request access to Optimizely CMP DAM through Optimizely.&lt;/p&gt;
&lt;p&gt;Once access is provisioned and the Graph integration is configured, the required GraphQL endpoint and authentication credentials become available.&lt;/p&gt;
&lt;p&gt;For example, the GraphiQL interface may look like:&lt;/p&gt;
&lt;div&gt;
&lt;pre&gt;&lt;code&gt;https://cg.optimizely.com/app/graphiql?auth=SINGLE_KEY
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;The GraphiQL interface is useful during development because it allows developers to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Explore the available GraphQL schema.&lt;/li&gt;
&lt;li&gt;Identify the DAM fields available for querying.&lt;/li&gt;
&lt;li&gt;Build and test GraphQL queries.&lt;/li&gt;
&lt;li&gt;Validate filters and response structures.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before implementing the GraphQL service, it is recommended to explore the DAM schema and understand how asset metadata is exposed.&lt;/p&gt;
&lt;h3&gt;Step 2: Store the Graph Single Key Securely&lt;/h3&gt;
&lt;p&gt;A Graph Single Key is required to authenticate requests to Optimizely Graph.&lt;/p&gt;
&lt;p&gt;For security reasons, the key should never be hardcoded into the application or committed to source control.&lt;/p&gt;
&lt;p&gt;In an Optimizely DXP environment, the key can be stored securely in the Optimizely PaaS Portal Key Vault.&lt;/p&gt;
&lt;p&gt;The application can then retrieve the key server-side when making GraphQL requests.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Authentication flow:&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;
&lt;div&gt;
&lt;pre&gt;&lt;code&gt;       Optimizely PaaS Key Vault
                  |
                  v
             Graph Single Key
                  |
                  v
           CMS Application
                  |
                  v
            Optimizely Graph
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;This approach keeps sensitive credentials outside the application source code and makes environment-specific configuration easier to manage.&lt;/p&gt;
&lt;h3&gt;Step 3: Enable and Synchronize DAM Indexing&lt;/h3&gt;
&lt;p&gt;Before DAM assets can be queried through Optimizely Graph, they must be indexed.&lt;/p&gt;
&lt;p&gt;In CMP, navigate to the following location:&lt;/p&gt;
&lt;div&gt;
&lt;pre&gt;&lt;code&gt;Settings
   |
   v
Organization
   |
   v
Misc
   |
   v
Enable &amp;amp; Sync DAM
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Enable and synchronize DAM to make the assets available through the Graph integration.&lt;/p&gt;
&lt;p&gt;Once synchronization is completed, the indexed DAM assets can be queried using GraphQL.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; CMS content and CMP DAM content have separate indexes and authentication keys in this implementation. They must therefore be queried independently.&lt;/p&gt;
&lt;p&gt;The application is responsible for combining the results from both sources.&lt;/p&gt;
&lt;h3&gt;Step 4: Create an OptiDamGraphService&lt;/h3&gt;
&lt;p&gt;To keep the implementation clean and maintainable, create a dedicated service such as OptiDamGraphService&amp;nbsp;to handle all communication with Optimizely Graph.&lt;/p&gt;
&lt;p&gt;The service is responsible for:&lt;/p&gt;
&lt;ol start="1"&gt;
&lt;li&gt;Receiving search criteria and filter information.&lt;/li&gt;
&lt;li&gt;Building the required GraphQL query.&lt;/li&gt;
&lt;li&gt;Adding the authentication key to the request.&lt;/li&gt;
&lt;li&gt;Sending the request to Optimizely Graph.&lt;/li&gt;
&lt;li&gt;Processing the GraphQL response.&lt;/li&gt;
&lt;li&gt;Mapping the returned DAM metadata into application models.&lt;/li&gt;
&lt;li&gt;Returning the DAM documents to the calling controller or application service.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;A simplified service invocation could look like this:&lt;/p&gt;
&lt;div&gt;
&lt;pre&gt;&lt;code&gt;var graphResponse =
    await _evaluateCMPGraphService.Service
        .GetDocuments(apiRequestDto);
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Here, the service receives the request DTO containing the required search criteria and returns the matching DAM documents.&lt;/p&gt;
&lt;h3&gt;Step 5: Map CMS Filters to DAM Filters&lt;/h3&gt;
&lt;p&gt;One of the important parts of this integration is handling filters consistently across CMS and DAM content.&lt;/p&gt;
&lt;p&gt;The listing page uses common filters such as Region or Geography. However, CMS and DAM may store these values differently.&lt;/p&gt;
&lt;p&gt;For example, a Geography filter selected by the user may have a corresponding choice value or identifier in the DAM metadata schema.&lt;/p&gt;
&lt;p&gt;Therefore, before executing the GraphQL query, the application needs to map the CMS filter values to their corresponding DAM values.&lt;/p&gt;
&lt;p&gt;The following code demonstrates this mapping approach:&lt;/p&gt;
&lt;div&gt;
&lt;pre&gt;&lt;code&gt;foreach (var item in cmsData.Filters)
{
    if (item.Label.ToLower() == "region" ||
        item.Label.ToLower() == "geography")
    {
        var field = fields
            .FirstOrDefault(x =&amp;gt; x.Name == "Geography");

        if (field != null)
        {
            foreach (var filter in item.Values)
            {
                var resolver =
                    new LookupResolver.LookupResolver();

                var englishValue =
                    resolver.ResolveGeography(filter.Label);

                var choice = field.Choices
                    .FirstOrDefault(
                        x =&amp;gt; x.Name == englishValue
                    );

                if (choice != null &amp;amp;&amp;amp;
                    !filter.Key.Contains("_"))
                {
                    filter.Key += "_" + choice.Id;
                }
            }
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;How does this work?&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Iterate through the filters received from the existing CMS search.&lt;/li&gt;
&lt;li&gt;Identify filters with the label Region or Geography.&lt;/li&gt;
&lt;li&gt;Find the corresponding Geography field in the DAM metadata fields.&lt;/li&gt;
&lt;li&gt;Resolve the selected filter label into its English equivalent using LookupResolver.&lt;/li&gt;
&lt;li&gt;Find the matching choice in the DAM field choices.&lt;/li&gt;
&lt;li&gt;Append the corresponding choice ID to the filter key when a match is found.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For example, a filter selected in the CMS listing may need to be translated into a DAM-specific value before it can be used in the GraphQL query.&lt;/p&gt;
&lt;p&gt;This mapping ensures that the same user-selected filter can be applied consistently to both CMS and DAM content.&lt;/p&gt;
&lt;p&gt;It also avoids maintaining completely separate filter-selection experiences for the two content sources.&lt;/p&gt;
&lt;h3&gt;Step 6: Fetch and Combine CMS and DAM Listing Cards&lt;/h3&gt;
&lt;p&gt;Once the filter mapping is completed, the application can retrieve DAM assets through OptiDamGraphService.&lt;/p&gt;
&lt;p&gt;At this stage, we have two independent result sets:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CMS Search Results&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Retrieved using the existing EPiServer Search implementation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CMP DAM Graph Results&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Retrieved using Optimizely Graph through the dedicated Graph service.&lt;/p&gt;
&lt;p&gt;Both result sets are then mapped into the application's unified listing model.&lt;/p&gt;
&lt;p&gt;The final model can be used by the existing listing component to display CMS content and DAM assets together.&lt;/p&gt;
&lt;h3&gt;End-to-End Implementation Flow&lt;/h3&gt;
&lt;p&gt;The complete request flow looks like this:&lt;/p&gt;
&lt;div&gt;
&lt;pre&gt;&lt;code&gt;                 User Request
                      |
                      v
                Listing Controller
                      |
          +-----------+-----------+
          |                       |
          v                       v
   Existing CMS Search      OptiDamGraphService
          |                       |
          v                       v
       CMS Index            Optimizely Graph
                                  |
                                  v
                               DAM Index
                                  |
                                  v
                              DAM Assets
          |                       |
          +-----------+-----------+
                      |
                      v
               Filter / Data Mapping
                      |
                      v
              Unified Listing Model
                      |
                      v
                 Listing Cards
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;This approach allows both content sources to operate independently while providing a single listing experience to the end user.&lt;/p&gt;
&lt;h2&gt;4. Key Benefits of This Approach&lt;/h2&gt;
&lt;p&gt;Integrating CMP DAM through Optimizely Graph provides several architectural and implementation benefits.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Existing CMS functionality remains unchanged&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The existing EPiServer Search implementation continues to retrieve CMS content without requiring major changes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Independent content retrieval&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;CMS and DAM assets are retrieved separately, making the integration easier to maintain and troubleshoot.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Centralized GraphQL integration&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;All GraphQL communication is handled through a dedicated service rather than being implemented directly inside controllers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Consistent filtering experience&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;CMS filter values are mapped to their corresponding DAM metadata values, allowing the same filters to be applied across both content sources.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5. Secure credential management&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The Graph Single Key is stored in the DXP Key Vault rather than being hardcoded in the application.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6. Flexible architecture&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Additional DAM fields, filters, or metadata can be incorporated without replacing the existing CMS search functionality.&lt;/p&gt;
&lt;h2&gt;5. Conclusion&lt;/h2&gt;
&lt;p&gt;Integrating CMP DAM with Optimizely CMS 12 using Optimizely Graph and GraphQL provides an effective way to extend an existing CMS search experience.&lt;/p&gt;
&lt;p&gt;Instead of replacing the existing search implementation, this approach introduces CMP DAM as a second content source.&lt;/p&gt;
&lt;p&gt;DAM assets are enabled and indexed in Optimizely Graph, retrieved through a dedicated Graph service, mapped to the existing CMS filters, and combined with CMS search results at the application level.&lt;/p&gt;
&lt;p&gt;The result is a unified listing experience where both CMS content and approved CMP DAM assets can be displayed together as listing cards.&lt;/p&gt;
&lt;p&gt;Most importantly, this architecture preserves the existing CMS functionality while introducing a separate and maintainable integration layer for DAM content.&lt;/p&gt;</summary></entry><entry><title>Alt text is retrieved for images imported from CMP-DAM in Optimizely CMS 12.</title><link href="https://world.optimizely.com/blogs/deepmala-s/dates/2025/12/alt-text-is-retrieved-for-images-imported-from-cmpdam-in-optimizely-cms-12/" /><id>https://world.optimizely.com/blogs/deepmala-s/dates/2025/12/alt-text-is-retrieved-for-images-imported-from-cmpdam-in-optimizely-cms-12/</id><published>2026-01-16T10:47:34.0000000Z</published><updated>2026-01-16T10:47:34.0000000Z</updated><author><name>deepmala.sharma@dxred.com</name></author><category term="Blog post" /><summary type="html">&lt;p&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Although image alt text is stored as metadata in CMP/DAM, it is not automatically rendered in browser HTML. This document outlines the solution implemented in Optimizely CMS to retrieve and render this metadata correctly.&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;Steps :&amp;nbsp;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;1) Create image file class and inherit with ImageData.&lt;/p&gt;
&lt;pre class="language-csharp"&gt;&lt;code&gt;public class ImageFile : ImageData
{
    [Display(Name = "Alt text", Order = 10)]
    public virtual string AltText { get; set; }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;2) Create image file view model&lt;/p&gt;
&lt;div&gt;
&lt;pre class="language-csharp"&gt;&lt;code&gt;public class ImageFileViewModel
{
    public string AltText { get; set; }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;3) Create image file request and paas in-built &lt;strong&gt;DAMAssetIdentity&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;pre class="language-csharp"&gt;&lt;code&gt;public class ImageFileRequest : IRequest&amp;lt;ImageFileViewModel&amp;gt;
{
    public ImageFileRequest(DAMAssetIdentity damAsset, CultureInfo culture)
    {
        Culture = culture;
        ImageFileReference = damAsset;
    }
    public DAMAssetIdentity ImageFileReference { get; set; }
    public CultureInfo Culture { get; }
}&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;4)&amp;nbsp;Create image file request handler and fetch Alt text from Dam using &lt;strong&gt;DAMAssetIdentity metadata&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;
&lt;div&gt;
&lt;pre class="language-csharp"&gt;&lt;code&gt;public async Task&amp;lt;ImageFileViewModel&amp;gt; Handle(ImageFileRequest request, CancellationToken cancellationToken)
 {
     if (request?.ImageFileReference != null)
     {
               temp.AltText = request?.ImageFileReference?.Metadata?.DAMAssetInfo?.AltText;
     }
     return temp;
 }&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;5) If in case while fetching alt text from Dam and if we will get&amp;nbsp;&lt;strong&gt;DAMAssetInfo &lt;/strong&gt;is null due to unaxpected behavior then we will use &lt;strong&gt;IDAMAssetMetadataService &lt;/strong&gt;showing below&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;pre class="language-csharp"&gt;&lt;code&gt;if (temp.Metadata?.DAMAssetInfo == null)
{
           var temp2 = ServiceProviderExtensions.GetInstance&amp;lt;IDAMAssetMetadataService&amp;gt;(ServiceLocator.Current).GetAssetMetadata(ExtractAssetGuid(temp).Value).Result;
        altText = temp2?.AltText;
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;6) After fetching Alt text successfully then we will pass in view.&lt;br /&gt;&lt;br /&gt;Above i have added only neccesary code other can add according to requirements.&lt;br /&gt;Below references added for CMP-DAM configuration and assets sync.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="text-decoration: underline;"&gt;Important Links&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style="text-decoration: underline;"&gt;&lt;a href="https://docs.developers.optimizely.com/content-management-system/v1.0.0-CMS-SaaS/docs/manage-assets-with-dam"&gt;https://docs.developers.optimizely.com/content-management-system/v1.0.0-CMS-SaaS/docs/manage-assets-with-dam&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="text-decoration: underline;"&gt;&lt;a href="/link/2fe7c7fbd7fb4251b60de7cc4c5447c7.aspx"&gt;https://world.optimizely.com/blogs/robert-svallin/dates/2025/2/cmp-dam-asset-graph-self-service/&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="text-decoration: underline;"&gt;&lt;a href="https://docs.developers.optimizely.com/content-management-system/docs/cmp-dam-in-cms"&gt;https://docs.developers.optimizely.com/content-management-system/docs/cmp-dam-in-cms&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;</summary></entry><entry><title>Custom Deepl Glossary Translation in Optimizely CMS </title><link href="https://world.optimizely.com/blogs/deepmala-s/dates/2025/9/custom-deepl-glossary-translation-in-optimizely-cms-/" /><id>https://world.optimizely.com/blogs/deepmala-s/dates/2025/9/custom-deepl-glossary-translation-in-optimizely-cms-/</id><published>2025-09-03T09:29:08.0000000Z</published><updated>2025-09-03T09:29:08.0000000Z</updated><author><name>deepmala.sharma@dxred.com</name></author><category term="Blog post" /><summary type="html">&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 9.5pt; line-height: 107%; font-family: 'Cascadia Mono'; color: black; background: white; mso-highlight: white;"&gt;Introduction in this post, I have created a custom DeepL glossary translation for specific words. For example, when translating from English to German, the standard translation for "Hello" is "Hallo." However, using my custom DeepL glossary, I want "Hello" to be translated as a custom word like "Ollha." This custom translation will override the normal Optimizely auto-translation and ensure that the glossary-defined terms are used instead.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 9.5pt; line-height: 107%; font-family: 'Cascadia Mono'; color: black; background: white; mso-highlight: white;"&gt;Repository link for reference&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 9.5pt; line-height: 107%; font-family: 'Cascadia Mono'; color: black; background: white; mso-highlight: white;"&gt;&lt;a href="https://github.com/mattpallatt/MP.LanguageManager.DeepLTranslate"&gt;https://github.com/mattpallatt/MP.LanguageManager.DeepLTranslate&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="text-indent: -18.0pt; mso-list: l0 level1 lfo2;"&gt;&lt;!-- [if !supportLists]--&gt;&lt;span style="font-size: 12.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;1)&lt;span style="font: 7.0pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-size: 12.0pt; line-height: 107%;"&gt;Install nuget &lt;/span&gt;package &lt;strong style="mso-bidi-font-weight: normal;"&gt;MP.LanguageManager.DeepLTranslate&lt;/strong&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: 9.5pt; line-height: 107%; font-family: Consolas; color: white; background: #002440;"&gt;dotnet add package MP.LanguageManager.DeepLTranslate --version 1.0.9&lt;/span&gt;&lt;br style="mso-special-character: line-break;" /&gt;&lt;!-- [if !supportLineBreakNewLine]--&gt;&lt;!--[endif]--&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="text-indent: -18.0pt; mso-list: l0 level1 lfo2;"&gt;&lt;!-- [if !supportLists]--&gt;&lt;span style="font-size: 12.0pt; mso-bidi-font-size: 9.5pt; line-height: 107%; font-family: 'Cascadia Mono'; mso-fareast-font-family: 'Cascadia Mono'; color: black; background: white; mso-highlight: white;"&gt;&lt;span style="mso-list: Ignore;"&gt;2)&lt;span style="font: 7.0pt 'Times New Roman';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-size: 9.5pt; line-height: 107%; font-family: 'Cascadia Mono'; color: black; background: white; mso-highlight: white;"&gt;Create &lt;/span&gt;&lt;strong style="mso-bidi-font-weight: normal;"&gt;&lt;span style="background: white; mso-highlight: white;"&gt;DeepLTranslateProvider class&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="text-indent: -18.0pt; mso-list: l0 level1 lfo2;"&gt;&amp;nbsp;&lt;br /&gt;public class DeepLTranslateProvider : IMachineTranslatorProvider&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private readonly Injected&amp;lt;IOptions&amp;lt;DeepLOptions&amp;gt;&amp;gt; _options;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string DisplayName =&amp;gt; "DeepL Web Translator";&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public DeepL.Formality DLFormality = DeepL.Formality.Default;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string EnglishType = "";&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string authkey = "";&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string AutoGlossary = "";&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string GlossaryList = "";&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public bool Initialize(ITranslatorProviderConfig config)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var languageManagerOptions = new LanguageManagerOptions();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var languageManagerConfig = new LanguageManagerConfig(languageManagerOptions);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; authkey = languageManagerConfig.ActiveTranslatorProvider.SubscriptionKey;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var options = _options.Service.Value;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var dlfv = "default";&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; dlfv = (options.Formality.ToLower() == "default" || options.Formality.ToLower() == "more" || options.Formality.ToLower() == "less" || options.Formality.ToLower() == "preferless" || options.Formality.ToLower() == "prefermore") ? options.Formality.ToLower() : dlfv;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; EnglishType = (options.English.ToLower() == "en-gb" || options.English.ToLower() == "en-us") ? options.English.ToLower() : "en-gb";&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; AutoGlossary = (options.AutoGlossary == "0" || options.AutoGlossary == "1") ? options.AutoGlossary : AutoGlossary;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GlossaryList = options.GlossaryList;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch { }&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // free API authorisation keys end in :fx...&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (authkey.EndsWith(":fx"))&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // ...set the formality to Default, as this is a Pro feature&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DLFormality = DeepL.Formality.Default;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DLFormality = dlfv.ToLower() switch&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "less" =&amp;gt; DeepL.Formality.Less,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "more" =&amp;gt; DeepL.Formality.More,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "preferless" =&amp;gt; DeepL.Formality.PreferLess,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "prefermore" =&amp;gt; DeepL.Formality.PreferMore,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _ =&amp;gt; DeepL.Formality.Default,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public TranslateTextResult Translate(string inputText, string sourceLanguage, string targetLanguage)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var translateTextResult = new TranslateTextResult&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IsSuccess = true,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Text = ""&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (string.IsNullOrWhiteSpace(inputText))&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return translateTextResult;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var n = DoTranslate(inputText, sourceLanguage, targetLanguage);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; n.Wait();&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; translateTextResult.Text = n.Result.ToString();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; translateTextResult.IsSuccess = true;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception ex)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; translateTextResult.IsSuccess = false;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; translateTextResult.Text = "An unexpected error occurred: " + ex.Message + ex.InnerException;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return translateTextResult;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public async Task&amp;lt;TextResult&amp;gt; DoTranslate(string inputText, string sourceLanguage, string targetLanguage)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var slci = new CultureInfo(sourceLanguage);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var tlci = new CultureInfo(targetLanguage);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string tl = tlci.TwoLetterISOLanguageName.ToString();&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // deal with PT, ZH (xx-xx) language codes&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (tl == "pt" || tl == "zh")&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tl = targetLanguage;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // dealing with depreciated "en" target language code using default EN code&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else if (tl == "en")&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tl = EnglishType;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // reset the glossary ID&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string glossaryID = "";&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var translator = new DeepL.Translator(authkey);&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ((AutoGlossary == "1") || (GlossaryList.Contains($"[{slci}&amp;gt;{tlci}]")))&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.Threading.Tasks.Task&amp;lt;GlossaryInfo[]&amp;gt; n = translator.ListGlossariesAsync();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; n.Wait();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List&amp;lt;GlossaryInfo&amp;gt; GI = n.Result.ToList();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; glossaryID = GI.FirstOrDefault(item =&amp;gt; item.SourceLanguageCode == slci.ToString() &amp;amp;&amp;amp; item.TargetLanguageCode == tlci.ToString())?.GlossaryId;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var translatedText = await translator.TranslateTextAsync(&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; inputText,&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; slci.TwoLetterISOLanguageName.ToUpper(),&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tl.ToUpper(),&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; new TextTranslateOptions { Formality = DLFormality, TagHandling = "html", GlossaryId = glossaryID }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; );&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return translatedText;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;public class DeepLOptions&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string Formality { get; set; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string English { get; set; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string AutoGlossary { get; set; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string GlossaryList { get; set; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public string ignoreExistingPages { get; set; }&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;strong style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-size: 9.5pt; line-height: 107%; font-family: 'Cascadia Mono'; color: black; mso-fareast-language: EN-IN; mso-no-proof: yes;"&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p class="MsoListParagraph" style="margin-bottom: .0001pt; mso-add-space: auto; text-indent: -18.0pt; line-height: normal; mso-list: l0 level1 lfo2; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;!-- [if !supportLists]--&gt;&lt;span style="font-size: 12.0pt; mso-bidi-font-size: 9.5pt; font-family: 'Cascadia Mono'; mso-fareast-font-family: 'Cascadia Mono'; color: black; background: white; mso-highlight: white;"&gt;&lt;span style="mso-list: Ignore;"&gt;3)&lt;span style="font: 7.0pt 'Times New Roman';"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style="font-size: 9.5pt; font-family: 'Cascadia Mono'; color: black; background: white; mso-highlight: white;"&gt;Create API Controller&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;[HttpPost]&lt;br /&gt;&amp;nbsp;[Route("/api/v1/glossary/create")]&lt;br /&gt;&amp;nbsp;public async Task&amp;lt;ActionResult&amp;gt; Create([FromBody] GlossaryDTO glossaryDTO)&lt;br /&gt;&amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;var timer = Stopwatch.StartNew();&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;GlossaryInfo glossaryInfo = null;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;try&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (glossaryDTO != null)&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;glossaryInfo = await _glossary.CreateGlossaryAsync(glossaryDTO.Name, glossaryDTO.SourceLang, glossaryDTO.TargetLang, glossaryDTO.GlossaryEntries);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;catch (Exception ex)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_logger.LogError(nameof(Index), ex, "Error GlossaryController getting GlossaryController");&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return StatusCode(500, new { message = ex.Message });&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;timer.Stop();&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;_logger.LogInformation(nameof(Index), $"Timer took {timer.ElapsedMilliseconds}ms");&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;return new JsonResult(new { message = glossaryInfo != null ? "Glossary has been created" : "Glossary is not created", glossary = glossaryInfo });&lt;/p&gt;
&lt;p&gt;&amp;nbsp;}&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpFirst" style="text-indent: -18.0pt; mso-list: l0 level1 lfo2;"&gt;&lt;!-- [if !supportLists]--&gt;&lt;span style="font-size: 12.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;4)&amp;nbsp; Do App setting configurations&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpFirst" style="text-indent: -18.0pt; mso-list: l0 level1 lfo2;"&gt;&lt;img src="/link/33369184368046c2a0ced050c52e5474.aspx" alt="" width="259" height="141" /&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="text-indent: -18.0pt; mso-list: l0 level1 lfo2;"&gt;&lt;!-- [if !supportLists]--&gt;&lt;span style="font-size: 12.0pt; mso-bidi-font-size: 11.0pt; line-height: 107%; mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin;"&gt;&lt;span style="mso-list: Ignore;"&gt;5)&lt;span style="font: 7.0pt 'Times New Roman';"&gt;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Set up&amp;nbsp;&lt;strong&gt;Deepl Web Translator&lt;/strong&gt; in Language manager plug in.&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpFirst" style="text-indent: -18.0pt; mso-list: l0 level1 lfo2;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; To use the DeepL Translator to perform automated translations make sure it's selected as Translator Provider in the settings of the Language Manager&lt;br /&gt;&lt;br /&gt;&lt;img src="/link/13e251e79575475f9c037c2d8d032737.aspx" alt="" width="612" height="189" /&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="text-indent: -18.0pt; mso-list: l0 level1 lfo2;"&gt;6)&amp;nbsp; &amp;nbsp;Create Glossary block and on view create glossaries. Set access right on block hide from visitors.&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="text-indent: -18.0pt; mso-list: l0 level1 lfo2;"&gt;6)&amp;nbsp; &amp;nbsp; Do auto translation from Language gadget.&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="text-indent: -18.0pt; mso-list: l0 level1 lfo2;"&gt;&lt;img src="/link/8b324cc53f8a470ab2c600dc2cf58982.aspx" alt="" width="461" height="163" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="mso-fareast-language: EN-IN; mso-no-proof: yes;"&gt;&lt;img src="/link/681b8d3697c0405cae6b60acba558dc2.aspx" alt="" width="322" height="238" /&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="text-indent: -18.0pt; mso-list: l1 level1 lfo1;"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</summary></entry></feed>