Update the translation mapping

The connector provides a mapping configuration to allow for direct mapping of language codes between Microsoft D365 and Sitecore Content Hub. By default, the connector automatically attempts to map existing language codes. In cases where the language code in D365 does not match the intended code in Content Hub, you can modify the translations mapping file to support a custom key value map.

Note

Connector language mapping is case-sensitive.

To update the translation mapping:

  1. Locate and open the producttranslations-mapping-config.json file.

  2. Under entity.localization, add the mapping property.

    RequestResponse
    
     { 
    "dataSource": "cr15a_ecoresproducttranslationentities?$orderby=modifiedon desc",
    "operations": [
      {
        "types": ["create", "update"],
        "config": {
          "entity": {
            "sourceIdentifier": "cr15a_productnumber",
            "targetIdentifier": "D365ProductNumber",
            "targetType": "M.PCM.Product",
            "localization": {
              "source": "cr15a_languageid",
              "mapping": { 
    
              }
    
            },
    
    
  3. Add a key value pair for each D365 language code to map to a Content Hub language code.

    RequestResponse
    
     { 
    "dataSource": "cr15a_ecoresproducttranslationentities?$orderby=modifiedon desc",
    "operations": [
      {
        "types": ["create", "update"],
        "config": {
          "entity": {
            "sourceIdentifier": "cr15a_productnumber",
            "targetIdentifier": "D365ProductNumber",
            "targetType": "M.PCM.Product",
            "localization": {
              "source": "cr15a_languageid",
              "mapping": { 
                "ru": "ru-RU",
                "zh": "zh-CN"
              }
    
            },    
    
    
  4. Save your changes and upload your updated mapping file.

Do you have some feedback for us?

If you have suggestions for improving this article,