Translate landingpages and sidebars

Are you familiar with the translation of articles, publications and author's profiles? See what the translation of landingpages and sidebars is used for and learn what "Term override" does.

Translation: Leuchtreklame

What is the translation function for?
How is it done? Example: Translation of a category landingpage
Translation of sidebars
Translation of dossier landingpages
Term override


What is the translation function for?

As described in How to translate articles, publications and author's profiles, the translation function in Drupal mainly serves the following two purposes:

  • It assigns different language versions of nodes, such as articles and publications, to each other, so that users can easily switch languages using the language switcher on top.
  • It creates clones of the original, so that editors don't need to re-upload contents for each language version, but can concentrate on translating the existing text into the respective target language(s).

Compared to articles and publications, landingpages are not as often translated. However, there are some cases where the translation function has to be used for landingpages as well:

  • For dossiers: Dossiers usually consist of a landingpage showing the articles, audio, video etc. and a sidebar related to the topic of the dossier. If the dossier is to be created in another language, users should be allowed to switch from one language version to the other by clicking on the language switcher on top of the page. Therefore, the main dossier landingpage needs to be translated to tell the system which language versions belong together.
  • For category (topic) overview pages, in particular for those assigned to a menu tab. This is very timesaving for editors, especially when setting up a site.
How is it done?

The translation of such a category overview page will be described below:

Out of reasons which later will become obvious to you, it is very useful to have the grid ready on the original page, before you start translating. So create all the containers you need, add the boxes and adjust them on the landingpage which is to be translated. This is what the grid of the homepage of the hbs office in Mexico looks like:

Imagine, the Mexico office would like to have a website in English as well. For now their website is Spanish only. Though the new site wouldn't have to provide all articles which are on the Spanish site, it is supposed to base on the same menu and page structure. So the editorial staff would start to re-create all the Spanish landingpages in English. This would be very laborious. It is easier to translate the Spanish pages into English.

To do so, they would click on Translate in the grid view. As there is no English translation yet, they would click on agregar traducción (create translation):

Now they are shown the Create landingpage form. The good thing about it is that it is aready pre-filled: They would probably override the Spanish title "Inicio" by the English "Homepage" but would leave all the rest as it is. Especially haven and category information should remain unchanged, to ensure that the structures of the original and its translation are identic.

They would save and could immediately work on the content of the page. To do so, they would open the grid: As the page is new, there is no grid yet and they will have to create one. They are now asked whether to boot a new (empty) grid or to clone the grid from the Spanish homepage "Inicio".

Now it becomes clear why it was so useful to build the entire grid of the original page before translating: When one clones the grid, it doesn't have to be re-created for the target language. This is timesaving because all the container settings, such as choosing the container and colorizing, and all the box settings, such as choosing the box, uploading and adjusting its contents and viewmode, don't need to be repeated. In our example, the top box already contains the latest article, landingpage or product in big (viewmode "main teaser"), no matter to which content category the content belongs to. Exactly these settings had already been made for the Spanish page and were simply cloned:

Of course, the text information such as container and box titles don't get automatically translated from Spanish into English. This is handiwork, which needs to be done by you. However, when you create a site with - let's say - only about 10 different topics/category pages, which are to be translated into two more languages, it is obvious how timesaving these translation clones are.

Translation of sidebars

When you have a look at the screenshot on top showing the cloned Mexican homepage, you may note that the sidebar is still Spanish, though on the English page. As sidebards are independent nodes, they have to be translated independently. The easiest way to do so, is from within the workflow: Open the grid of the landingpage which is to be translated, hover your mouse over the sidebar and click on Edit. Then click on  Edit the assigned sidebar. In our example "Sidebar Inicio - es" is still assigned, as the translation (cloning) of the landingpage didn't change its sidebar assignment.

You will be taken to the Spanish Inicio-sidebar. Now click on Translate on the top right and ...

...again, there will be a pre-filled new node Create Sidebar, now in the English version, which only has to saved.

Now click on Grid on the top right. As for the landingpage, the system will now ask you, whether you want to boot a new (empty) grid or clone the existing grid of the Spanish sidebar. In order to save work and time, choose the cloning. For the sidebar, there is only one one-column container, but it has already been pre-filled with the Spanish sidebar contents. The only thing to do now is to exchange the Spanish text (for instance box titles) by its English equivalent and perhaps to remove some of the boxes which are only suitable for the Spanish version and replace them by more suitable English ones. When done, close the sidebar tab in your browser. You will be taken back to the assign-sidebar dialog:

Remove the assigned Spanish sidebar by clicking on the cross next to the sidebar title ...

... and replace it by the newly created English one by just typing its name and picking it from the list:

Save by clicking on the green checkmark on the top left.

Translation of dossier landingpages

Above, we explained how translation works for the main category pages and why this is especially helpful when creating and assigning pages with a structure that more or less consists of automatic lists. In dossiers, landingpages often don't consist of automatic list. Yet, translation is also useful for dossier pages though the translation process may not be as timesaving, as articles have to be placed manually in their respective language on the target landingpage. Anyway, translation is always necessary to tell the system that a dossier and its translation belong together. If you don't remember how to place articles manually on a landingpage, read again our How-To about landingpages and dossiers.

Term override

Loosely speaking, "Term override" defines which landingpage is to be shown when you click on a certain menu tab. By the way, term overriding works for articles, too, but a click on a menu tab should always lead to a landingpage. You will most likely not use the Term override function very often. However, as it may be interesting for more advanced users and as mistakes can fairly easily be undone, it shall be briefly explained here. To understand what it is for, some prior knowledge may be helpful:

When it comes to building the menu structure of a website, the menu tabs will by default be assigned to terms (which had initially been determined as the website basis by the the team of website conceptors during the planning process). On our boell-sites, these terms will basically correspond with the main topics of the foundation. That means that "Democracy", "Ecology", "International Politics" etc. are not only the names of the menu tabs, but also of the terms which the website is based on.

Before term-overriding, the main pages, which can be accessed by clicking on the menu tabs, would consist of nothing else than long lists, showing everything categorized by a respective term. Here is an example of such a "termpage" on the U.S. website:

These lists can be useful for archive pages, but look very boring (especially if the entire website consists of such lists only) and they cannot provide all the desired information on a topic, such as video, audio, image which is delivered by using grid boxes. That's why more experienced editors will replace these lists by landingpages, which can be neatly designed in a grid as described in our How to on landingpages. And this is, how it's done:

Given that we have created a landingpage called "Climate & Energy", which is supposed to override the page of the "Climate & Energy" term, so that the system shows this landingpage, when a user clicks on the "Climate & Energy" menu tab:

Open the landingpage "Climate & Energy", then click on Term override in the blue link line:

Then slowly start typing the category name into the field: Use this Node as Override for a certain Term. If your spelling corresponds with an existing term, the correct term will be found and you can pick it. In our example, the term had been found by typing "Clima...." The Term-ID (tid) of the "Climate & Energy" term ist 39. When the term which is to be overridden was found, save. Please note: It may be a little confusing that the screen view doesn't change. However, you might have noticed in your status line (at the very botton) that a saving process was being carried out, and you can check by clicking on the menu tab, that now the landingpage shows up instead of the termpage.

When you now click on your "Climate & Energy" menu tab, the landingapge will be correctly assigned to the tab and there will now be two blue link lines, one for the landingpage and one for the termpage:

In the above described example, the menu tab was called the same as the category. Please note that this doesn't have to be the case. For instance, a cool dossier landingpage could be created and named "Cool dossier". The "cool dossier" page could override any of the termpages, for instance the "Culture" term which may have been originally assigned to the "Education & Culture" menu tab. In this case, clicking on "Education & Culture" would show the "cool dossier" landingpage.

Please note: The term structure on boell.de is much more complex than the one on the international office websites and also comprises "Stiftung", "Regionen", "Tags", "Themen" and "Product series" as overridable terms. However, on the websites of the international offices, only topic categories can be overridden by landingpages.