Multi-lingual Web Quick Start

Showing results for 
Search instead for 
Did you mean: 

Multi-lingual Web Quick Start

0 0 6,322

Obsolete Pages{{Obsolete}}

The official documentation is at:

This document describes the features provided by the multilingual enhancements to Web Quick Start (WQS). The features become enabled on a Share site when a WQS website has been imported using the Web Quick Start dashlet. For the sake of the example in this document we will assume that the Government sample site has been imported.

Note that this document has been produced by the Engineering team in the spirit of openness to provide a brief overview of the functionality as it is expected to be when Project Swift is complete. The release associated with this project is currently expected to be released in 2011. Please see the Roadmap 2011 page for further information about this release. It is important to note that Alfresco reserves the right to alter or remove any functionality without giving notice. This document does not constitute any formal declaration or undertaking by Alfresco to release the functionality described herein.

Translating an asset that is *not* in a translated section

A new action is available on assets in a WQS website: 'Manage Translations'. When this action is selected for the first time on an asset, a page is shown to the user that shows a list of available locales and allows the user to select one as being the relevant locale for the selected asset.


For example, clicking on the text 'Mark this as the English translation' will make this asset translatable.

As soon as that has been done the page refreshes. It should now have changed to look like this:


Note that this page shows you that there is an English translation of the asset (the one you just marked). Alongside each of the available locales you have one of two options. For the locale for which a translation already exists you can choose to edit it. In our current example, clicking on the 'Edit' text alongside the English translation should cause the form to open that allows us to edit the content of this node. For any locale for which no translation currently exists you can choose to create one. To continue our example, we'll choose to create a German translation of our asset by clicking on the 'Create' text alongside the label 'German'.

This brings up a form to allow us to create this new piece of content. We'll enter some information:


Note that, in this case, we do have to change the name of the translated asset, otherwise the name will clash when we try to save it. There are cases when this isn't necessary that we'll come to later when describing translation of sections. When we save this form the new asset is created in the repository in the same section as the original asset that we translated. We are taken to the details page for the new asset. From this page we'll click on the 'Manage Translations' action again. The page that appears should now look like this:


Notice that the English and German translations are both shown in the list now - either can be edited by selecting the appropriate 'Edit' link.

Translating a section

It is also possible to translate a section of a website. The expected use of this is to allow people to build editions of their website for different locales. Much like assets, each section also has the new action available: 'Manage Translations'.

The sample websites now have a new section named 'en' inserted between the root section and the top level sections (blog, news, and so on). This new section is intended to form a starting point for people to create translations of the website. As an example of how it works we'll choose the 'Manage Translations' action on the 'en' section. As you might expect, the Manage Translations page appears much as it did for the blog post earlier, and we are asked to choose which locale the selected section is relevant to. In this case we'll 'Mark this as the English translation'.

Once we've done that, the page changes to give us the option to create a new translation of this section:

In our example we are going to choose to create a German translation, so we click on the text 'Create' next to the option 'German'. The following form appears where we can enter the name, title, and description of the translated section:

We enter the information as in the screenshot above and save. We are taken to the details page for the new 'de' section, and choosing the 'Manage Translations' action again shows us that the 'en' and 'de' sections are now related to one another as translations. Something else to look at is the asset collections in the new 'de' section. Comparing them to those in the original 'en' section we can see that the configurations from the 'en' section have been copied across to the new 'de' section.

Translating an asset within a translated section

We've already looked at how asset translation works when not within a translated section. Things change somewhat when the asset is inside a translated section. Now that we have translated our 'en' section into German (the 'de' section) we can show how this works. In the 'en' section there is an asset named 'feature.html'. We'll create a German translation of it.

Choose the 'Manage Translations' action. There's immediately one thing that's different: above the table of available locales there is a link with the text 'Mark this document as the English translation'. The system has noticed that you are inside a section that is marked as English, and therefore makes it easy for you to mark this asset as being English too:


Mark this as being the English translation and then create the German translation by clicking on the text 'Create' next to the label 'German'. An edit form appears in which we can enter the content for the German translation. In this case we will not change the name of the asset. We'll enter the information like this:


When we click on the Create button we are taken to the details page of the new, German asset, but take note of which section this new asset has been created in:


The system has looked up the hierarchy of sections from the asset that was being translated (the English feature.html) and has seen that one of the sections ('en') has been translated into German. It has therefore decided to place the German translation of the feature.html asset into the German translation of the 'en' section (which is the 'de' section). So the new German asset is in the 'de' section.

Now we'll take this a step further. In our example so far we have translated just the 'en' section. Let's now go into the 'en/news/family-home-community' section and translate 'article3.html' into German. We follow exactly the same pattern as we've done before. Select 'Manage Translations' on 'article3.html' and click on the link that marks it as the English translation. Then click on 'Create' next to the 'German' label. In the form that appears enter some German text (or at least pretend). There is no need to change the name of the asset - it can stay as 'article3.html'.

Now when you close the form by clicking on the 'Create' button you will notice that the new translation has been created in the section '/de/news/family-home-community'. The 'news' section and the 'family-home-community' sections have been translated too, and the translated article has been placed in the correct place in the German website structure. Note that you can subsequently edit the names of these sections so that 'family-home-community' becomes 'familie-wohnen-nachbarschaft', for example. Translations will continue to work as above even if the names of the translated sections are changed.


In summary, the features added to Web Quick Start are:

  • Mark an asset as translatable
  • Mark a section as translatable
  • Edit the locales available on a particular website
  • See the translations of a given asset
  • See the translations of a given section
  • Create a new translation of a translatable asset
  • Create a new translation of a translatable section
  • Edit a translation of a translatable asset
  • Edit a translation of a translatable section

Web Quick Start