Content Translator Smart Desktop Widget For Ektron

Multi-lingual content improves the popularity of a website and are part of new age marketing strategy. This draws attention to the significance of content translation in a content management system.

So how does the popular Content Management Systems translate the contents to other languages? This needs integration with third party translation services, which will allow the CMS user to send the content to the translation services and get it translated to the required language. If you are an Ektron CMS user and would like to offer multi-lingual content, read on.

At present, Ektron provide means to do the translation with the help of third party/in-house translation agencies/services .This is provided by means of “Export for translation” and “Import Translated Files” options in the workarea. Ektron allows you to generate the XLIFF file of a content (which is called as Export for Translation) and allows to Import the translated XLIFF back to the CMS.

Do we have to go through all this workflow to get a content translated? Can we have a direct approach? Yes! we can. As a Premier Partner of Ektron for APAC region, we have realized this need and developed a
content translator widget that will revolutionize the way the content translation is done through Ektron. The idea of “Content Translation Smart Desktop Widget” derives from this thought.

The Content Translation widget is a smart desktop widget which will enable the user to pick the specific content and choose the corresponding language to which the content needs to be translated, hit the translate button and that’s it! Your content is translated!

This custom widget is implemented in two modes.

I) In House Translation Widget.

This Custom widget deals with in house Manual Translation of content and syncing them back to workarea.

II)Google Translator Widget.

This Custom widget is an Integration of  the Google translate API with Ektron for dynamically translating contents between thousands of language pairs.

In House Translation Widget

  • Widget UI:

The widget UI contains the following elements,

A TreeView Server control which enable the user to pick the content from workarea.

A “Get Content Data” button, which will populate the content data to the textbox, and this data can be translated internally.

A link to Google Translate is provided along with widget UI to do the translation right away. User can make use of any other free online translation site’s for this purpose or this can be done internally.

Once translated the translated data can be pasted to the adjacent”Translted Text” textbox.

‘Translate” button, which will translate the corresponding content.

Inhouse content translator

  • Code Sinppets:

A tree view can be generated to show all the contents from the workarea.
This can be done by pulling the folder array data by Content API and serializing it to xml.

Content Translator

The folder array data xml can be binded to a Treeview server control and the folder id can be assigned as the node value.

Image2 CT

Image3 CTA Sample Folder Data XML looks like the following:

-<ArrayOfFolderData xmlns:xsi=”” xmlns:xsd=””>
<Id>73</Id> <TemplateId>0</TemplateId> <ParentId>0</ParentId> <NameWithPath/> <Name>Main Site</Name> <Description/> <IsPermissionsInherited>true</IsPermissionsInherited> <IsHidden>false</IsHidden> <InheritedFrom>0</InheritedFrom> <PrivateContent>false</PrivateContent> <IsXmlInherited>false</IsXmlInherited> <XmlInheritedFrom>0</XmlInheritedFrom> <StyleSheet/> <TemplateFileName/> <IsStyleSheetInherited>false</IsStyleSheetInherited> <IsTemplateInherited>true</IsTemplateInherited> <TemplateInheritedFrom>0</TemplateInheritedFrom> <ApprovalMethod>0</ApprovalMethod> <ApprovalType>NotForceAll</ApprovalType> <MetaInheritedFrom>0</MetaInheritedFrom> <IsMetaInherited>true</IsMetaInherited> <HasChildren>true</HasChildren> <PublishPdfActive>false</PublishPdfActive> -<Permissions>
</Permissions> <TotalContent>0</TotalContent> <IsDomainFolder>false</IsDomainFolder> <DomainStaging/> <DomainProduction/> <FolderType>0</FolderType> <Type>Content</Type> <IsSitemapInherited>true</IsSitemapInherited> <BreadCrumbPath/> <IsCommunityFolder>false</IsCommunityFolder> <IsTaxonomyInherited>true</IsTaxonomyInherited> <AliasInheritedFrom>0</AliasInheritedFrom> <IsAliasInherited>true</IsAliasInherited> <AliasRequired>false</AliasRequired> <FlagInheritedFrom>0</FlagInheritedFrom> <IsFlagInherited>true</IsFlagInherited> <IsCategoryRequired>false</IsCategoryRequired> <IsContentSearchableInheritedFrom>0</IsContentSearchableInheritedFrom> <IsContentSearchableInherited>true</IsContentSearchableInherited> <IscontentSearchable>false</IscontentSearchable> <DisplaySettings>0</DisplaySettings> <DisplaySettingsInheritedFrom>0</DisplaySettingsInheritedFrom> <IsDisplaySettingsInherited>false</IsDisplaySettingsInherited>
</FolderData> –
The content can be updated with the translated data by using the ContentManager Framework API class.


Google Translator Widget:

  • Widget UI:

The widget UI contains the following elements,

A TreeView Server control which enable the user to pick the content from workarea.
Two dropdownlists to choose the Source Language and language to which the content needs to be translated.
A “Translate Content” button which will do the Translation.


  • Code Snippets:

A content tree can be generated with the above code.
The content translation can be done by means of Google APIs Client Library for .NET.
As Google has shut it’s free Translation Service completely from Dec 01,2011,We need to make use of the new Translation API V2,which is a paid version. The translation of the Content can be made by making an Ajax call to the Google Translate API along with parameters like source language, target language, Valid API key, text which needs translation.
The JavaScript function used for this is as follows:

Image5 CT Jscript

And the translated text is updated to the content programmatically.


Author : Bisileesh Bhaskaran Date : 06 May 2013