Skip to main content

Optimizely CMS Connector: Translating Custom JSON Properties

You can create JSON properties for a block or page in Optimizely. These JSON properties can be used as custom field data for your organization, such as your brand’s SEO keywords.

Example of a block with a JSON property

{
    "isFolder": false,
    "contentModelType": "Block",
    "locales": [
        "en",
        "de"
    ],
    "locale": "de",
    "id": "123",
    "parentId": "456",
    "name": "Seo header",
    "type": "Company.Web.Features.Important.SeoInformation",
    "isLocalizable": true,
    "hasChildren": false,
    "contentTypeId": 78,
    "status": "Published",
    "isPendingPublish": false,
    "properties": {
        "episerverEntryName": {
            "propertyType": "String",
            "name": "episerverEntryName",
            "type": "String",
            "value": "Seo header"
        },
        "keywords": {
            "propertyType": "Json",
            "name": "Keywords",
            "type": "Json",
            "value": [
                {
                    "title": "First keyword title",
                    "name": "first"
                },
                {
                    "title": "Second element title",
                    "name": "second"
                },
                {
                    "title": "Third element title",
                    "name": "third"
                }
            ]
        }
    }
}

How to configure custom JSON properties for translation

  1. In your Episerver project, go to Project Settings > Episerver Settings

  2. Under Content Parsing, find the block or page containing custom properties

  3. Set the custom property parsing setting to 'Translate'.
    ​

    Block parsing setting.png
  4. Next, map the custom property under Custom JSON Settings by finding the custom JSON property from the list and setting it to 'Translate', for example:

Custom JSON Parsing.png

You can now translate custom JSON properties in Smartling.

Did this answer your question?