cancel
Showing results for 
Search instead for 
Did you mean: 

Relation between main and translated content in WCM

dhananjai
Champ in-the-making
Champ in-the-making
We are in the process of implementing Alfresco WCM for our web site which has translations in 23 languages
Each of the localized sites has thousands of dynamic pages (say ~2000 pages) with thousands of assets (~3000) like PDF, images and audio/video file.
Each of the translated local sites (or Geo Site) is managed by a different person (Geo site manager) located at a different location and translation can be done by a centralized translation agency or local translation agencies.

Question:
How to maintain relation between the “Main Content XML” and “Translated content XML” and relationship in their versions (i.e. which “Translated content XML” is a translation of which version of “Main Content XML”).
Could somebody suggest the translation workflow for such a scenario?
1 REPLY 1

pmonks
Star Contributor
Star Contributor
This is a content modeling exercise, and currently relationships between assets are stored in an element of type <xs:anyURI> in the web content XML files, regardless of the use case (related items, links to images and other static assets, "special" relationships between assets such as parent translation references, etc. etc.).

For translation, you'd store a reference (<xs:anyURI> element) in the child translation, pointing to the parent translation.  So for example a translatable "press release" content type might look something like the following:


<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:pr="http://www.alfresco.org/alfresco/press-release"
           targetNamespace="http://www.alfresco.org/alfresco/press-release"
           elementFormDefault="qualified">

  <xs:simpleType name="LocaleType">
    <xs:restriction base="xs:string">
      … other locales go here …
      <xs:enumeration value="en_AU" />
      <xs:enumeration value="en_US" />
      … other locales go here …
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="PressReleaseType">
    <xs:sequence>
      <xs:element name="Title"             type="xs:normalizedString" minOccurs="1" maxOccurs="1" />
      <xs:element name="Summary"           type="xs:normalizedString" minOccurs="0" maxOccurs="1" />
      <xs:element name="Keyword"           type="xs:normalizedString" minOccurs="0" maxOccurs="unbounded" />
      <xs:element name="PublishDate"       type="xs:date"             minOccurs="0" maxOccurs="1" />
      <xs:element name="ExpiryDate"        type="xs:date"             minOccurs="0" maxOccurs="1" />
      <xs:element name="Locale"            type="pr:LocaleType"       minOccurs="1" maxOccurs="1" />
      <xs:element name="ParentTranslation" type="xs:anyURI"           minOccurs="0" maxOccurs="1" />
      <xs:element name="Body"              type="xs:string"           minOccurs="1" maxOccurs="1" />
      <xs:element name="Image"             type="xs:anyURI"           minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>

  <xs:element name="PressRelease" type="pr:PressReleaseType" />

</xs:schema>
Say you have a single logical press release with two translations (an original English (US) asset and a derived English (Australian) asset), the XML might look like:


    <!– Original English (US) asset –>
    <PressRelease>
      … other elements …
      <Locale>en_US</Locale>
      <!– Note: no ParentTranslation element since this is the "master" translation –>
      … other elements …
    </PressRelease>

    <!– Derived English (Australian) asset –>
    <PressRelease>
      … other elements …
      <Locale>en_AU</Locale>
      <ParentTranslation>/path/to/original/english/us/file.xml</ParentTranslation>
      … other elements …
    </PressRelease>
This structure basically defines a mini-hierarchy per logical asset, where the nodes in that hierarchy are separate XML files that each represent an individual translation.  The primary advantage of this approach is that the tree can grow over time as translations trickle in - you're not forced to wait for the translations to arrive before publishing the original (or those translations that are created quickly).

Cheers,
Peter