Multilingual Capabilities of OSF Entities

From OSF Wiki
Jump to navigation Jump to search

Multilingual capabilities of OSF Entities will only appears to the system administrators and content curators if Drupal's multilingual capabilities are enabled. However, once they are enabled, a series of new features will be available to the users.

Multilingual Implementation in OSF Entities

In this section we will cover how the multilingual capabilities of OSF Entities have been implemented. The translation mechanism that has been implemented for OSF Entities is similar to the Field Translation one in Drupal. This means that we don't create new resources every time we create translate an existing resource in another language. We simply translate the values of the fields, and assign a language for each of the values.

Let's take a Resource Entity. That Resource Entity has been initially described using the English language. This means that multiple fields have been defined for that Entity, and that the literals values of these fields are written in English.

Then when the multilingual capabilities of the module kicks-in, we are able the translate the same Resource Type Entity in other languages. This means that all the fields that accepts literal values can be translated in other languages (the ones enabled in the Drupal portal).

Multilingual 8.PNG

Once an Entity got translated in one or multiple languages, OSF Entities will merge all the translated fields in a Canonical Resource. It is that canonical resource that is saved in OSF.

Translating Resource Type Entities

It is really easy to translate existing Resource Type Entities once the Drupal portal's multilingual capabilities are properly configured. If you edit any Resource Type Entities, then you will see a new TRANSLATE tab.

Multilingual 9.PNG

What you will see in this tab is one row per language configured on the Drupal portal. Then you will have the list of translations for that entity that you are editing. If the TITLE column for one of the language is empty, it means that the entity is not yet translated.

Multilingual 10.PNG

If you click the edit link of any translation of that entity, you will get to a new edit page where you will be able to edit entity using the selected language. Then you will see appearing a message that warn the user that he is currently translating the entity in French (or the selected language from the previous step). Every literal that will have written in that French translation page will be tagged with the French language. Every time that a search will be performed in French, or that this entity will be viewed in French, we will see the translation that has been defined in that page.

Multilingual 11.PNG

Once the user click the Save button, the new translation will be saved into OSF and will be available to all the system that uses that information.

A Word about Revisioning

The multilinguality capabilities of the OSF Entity module has no impact on the revisions capabilities of the module. Every modifications to the entity, in any language, will be accordingly revisioned into OSF. If you click the REVISIONS tab, you will be able to see, compare and manage all the revisions, in any language.