Salesforce Commerce Cloud does not have an API that supports the translation of Page Designer content via the Connector. However, these pages can be manually exported, translated, and imported back into Commerce Cloud.
The following steps guide you through a work-around to translating Page Designer content.
Step One: In Salesforce, Create an Export Job
- In your Salesforce instance, go to Administration > Operations > Jobs
- Click New Job
- Enter an ID (required) and a description (optional)
- Click Create
- Next, click the Job Steps tab
- Select the flow where you want to add a step
- Click Configure a step, and select a step
- Configure the step parameters:
- ID: a required unique ID for the job step identifier
- ExportFile: export file name and path relative to 'IMPEX/src'. All path folders must exist.
- OverwriteExportFile: select this checkbox
- PageIDs: a JSON object containing the single property 'page_ids', which is an array of Page IDs, e.g.: {"page_ids": ["campaign-example", "homepage-example"]}
- Locale: the Site source locale for which the Page data will be exported
- This should match with the source locale of your Smartling SFCC Project
- FileFormat: the format in which the data will be exported, e.g.: JSON
- Click Assign
- Under Scope, add a scope for the flow by selecting specific sites
- Click Assign
Step Two: In Salesforce, Create an Import Job
- In your Salesforce instance, go to Administration > Operations > Jobs
- Click New Job
- Enter an ID and description
- Click Create
- Next, click the Job Steps tab
- Select the flow where you want to add a step
- Click Configure a step, and select a step
- Configure the step parameters:
- ID: a required unique ID for the job step identifier
- WorkingFolder: the folder that contains the import files, relative to the 'IMPEX/src/' folder
- If not defined, 'IMPEX/src/' is used as a working folder. The folder IMPEX/src/instance configured in the job. It can be more specific, IMPEX/src/smartling-translation for example
- FileName: the file name for the file to be imported (relative to the 'WorkingFolder'), for example, imported-pages.zip
- NoFileFoundHandling: the step exit status that will be used when no matching files are found
- Supported values: OK, ERROR, WARN, NO_FILES_FOUND
- Default Value: NO_FILES_FOUND. The default value is used in this job configuration
- ImportFailedHandling: the step exit status that will be used when the import process fails
- Supported values: ERROR, WARN
- Default Value: WARN. The default value is used in this job configuration
- AfterImportFileHandling: controls what to do with the imported file after successful or failed import
- The handling is not performed if there was a locking problem, or if ImportFailedHandling is ERROR and the file failed to validate
- Supported values: Keep, Delete, Archive, Archive Zipped
- Default value: Archive. The default value is used in this job configuration
- ArchiveFolder: the folder to store archived import files
- Used when 'AfterImportFileHandling' is 'Archive' or 'Archive Zipped'
- Folder location relative to 'IMPEX/' folder. If not defined, 'IMPEX/archive/' is used
- Default Value: archive. The default value is used in this job configuration
- FileFormat: the format in which the data will be exported, e.g.: JSON
- Click Assign
- Under Scope, add a scope for the flow by selecting specific sites
- Click Assign
For more information about Salesforce job creation, read Salesforce documentation.
Step Three: Export and Translate Content
- Run the export job manually or configure a schedule
- You can find information about every job launch in the Job history tab
- You can find information about every job launch in the Job history tab
- To download an archive of requested content of pages stored in the configured ExportFile property path, go to Administration -> Site Development -> Development Setup, on the Folder Browser tab. You should navigate to Impex -> src folder
Step Four: Prepare The File For Translation
Consult your Solutions Archect about the directives required for your particular source file.
Step Five: Upload Files To Smartling For Translation
- In Smartling, go to a Files project
- If you don't already have a Files project-type set up, follow these steps to create a project
- Create a Job by Requesting Translation
- When the Job is complete, download the translated files
- You should receive an email notification when the Job is complete
Step Six: Import Translated Content to Salesforce Commerce Cloud
- Prepare translated content:
- The translated filename must be the same as the source, with the suffix ‘_<target_locale>’
- Translated files must be compressed to the archive. For example, with command zip -r9 imported_pages.zip campaign-example_fr.json homepage-example_fr.json
- The archive must be uploaded to the SFCC folder configured in the WorkingFolder property of the import job
- Run the import job manually or configure a schedule.
- You can find information about every job launch in the Job history tab
- Translations will be applied if the job finished successfully