allBlogsList

XCentium Language Translation Services

Introduction

Hello again! I am back with another blog to share some of the exciting new features being developed at XCentium for use with the Optimizely Configured Commerce Cloud platform. We continue to stretch the boundaries of the platform and enjoy sharing the more impactful new functionality with you. In this blog, we will focus on the new XCentium Language Translation Services. We recently decided to take on the challenge of implementing an automated process to populate the foreign language translations when adding a new language to an Optimizely Configured Commerce website. Adding the new Language to the website is easy but then you are left with the task of populating each of the translations. Populating the translations is a challenge that every Optimizely website faces when dealing with foreign language support. We knew that we could provide a great solution and we are pleased with the results.

Supported Languages

The XCentium Language Translation Service uses English as the base for translations. The foreign languages that can be translated by the service must first be added to the Enabled Languages for the target website. A website administrator can do this using the Languages tool in the Admin Console. As you can see in my screenshot, we have configured a few languages to support and will be focusing on the Spanish translations in our examples.

Language1

Figure 1: Optimizely Language Tool

The Translation Dictionary is a system built into the Optimizely Configured Commerce Cloud platform that allows a developer to define a string as translatable. Then, using the Translation Dictionary in the Admin Console, an admin can define the foreign language translation for each translatable string. This typically applies to content on the site, not product data. When the site is rendered using a supported foreign language, all translatable strings will appear in that language, assuming a translation was made.

This is where the XCentium Language Translation Service takes over. The service will look at your translatable strings and translate them into the target foreign language for you with a few button-clicks.

Language2

Figure 2: Translation Dictionary Pre-Translation

Google Translate API

We decided to use Google Translate API to perform the actual language translations. Their service has been around for a long time and is widely trusted among our staff and clients.

There are two modes that the Google Translate API can operate: basic and advanced. In basic mode, strings must be translated one at a time by the Google Translate API. This makes this option slower, but it is free, so the price is right for smaller and smaller-medium sized Translation Dictionaries. In advanced mode, an array of strings can be passed at once to the Google Translate API. This makes the service faster but has an additional cost.

For the XCentium Language Translation Service, we ultimately decided to implement the basic approach as these translations are not done at run-time, so speed isn’t really a large factor.

XCentium Language Translation Service

That brings us to the Language Translation Service itself. The service is accessed using an Integration Job. The Integration Job can be triggered as frequently as you need based on your use case. We feel like in simple situations, running it once would be sufficient. The Integration Job will generate sufficient logs to notify you of the progress as the translations are generated. 

Once the Integration Job Is complete, you can view the generated Translations in the Translation Dictionary using the Optimizely Configured Commerce Cloud Admin Console. 

XCentium Language Translation Service Optional Parameters

The service runs as an Integration Job on your Optimizely Configured Commerce Cloud website. There are two optional parameters that can be used during the job.

Language3

Figure 3: Optional Integration Job Parameters

Target Language ISO-639 Code allows you to select a specific language and run only those translations. This is useful for updating translations for one language without changing your other language translations.

Use Translated English as Keyword for Translations allows you to customize your English language translations and use those as the source for the foreign language translations. For example, you want your form buttons to display ‘Submit Form’ instead of ‘Submit’. This would become an entry in the Translation Dictionary so that every time the button was shown, the Translation Dictionary would return ‘Submit Form’. Using this parameter, the translation for this field would be based on ‘Submit Form’ where the default translation would still be based on ‘Submit’.

Viewing the Results

Once the translations are complete, they can be viewed/updated in the Translation Dictionary. This allows you to modify any translation that you want to manually override. As you can see below, the Google Translate API is smart enough to handle common symbols, placeholders, and abbreviations. We were happy with the results and are confident that you will be as well.

Language4

Figure 4:Translation Dictionary Post-Translation

Summary

That is probably a good overview of the XCentium Language Translation Service. This service will be a huge time-saver and really simplifies the process of populating your foreign language translations.

Thank you for your time, I hope you found this article useful. Feel free to reach out to me or XCentium directly if you have questions or feel interested in any of our custom solutions for the Optimizely Configured Commerce Cloud platform. We would love to work with you to help maximize your investment in Optimizely Configured Commerce.