Multilingual Content and Translations

Assets in Oracle Content and Experience can exist in any number of languages. When content authors create assets, they can choose from any languages that are enabled for the repository. A repository will always have a default language for assets, which is the language that’s set if none is selected.

Assets can also be translations of each other. Suppose you have an article in English and want it translated to Spanish. You can then create a Spanish article, which is a translation of the English asset. An asset can have as many translations as there are languages enabled for the repository. All translations of an asset need to be of the same type.

A collection of translations of the same content item is called a translation set. A translation set has a master asset, which is usually the asset that was the source for the other translations. You can change translation sets and mark any asset of a set to be the master.


Description of headless_multilingual-content_translation-set.png follows
Description of the illustration headless_multilingual-content_translation-set.png

Alternatively, assets can be marked as nontranslatable. These assets don’t have the option to add translations.

Translations of assets are managed in Oracle Content and Experience, as shown in the following image. In this example, the translation set contains two assets, with English as the master and Spanish its translation.


Description of headless_multilingual-content_translations.png follows
Description of the illustration headless_multilingual-content_translations.png

Each translation of an asset is a complete asset itself. Even though all translations are shown in the Oracle Content and Experience interface as one item, each translation is an asset in its own right behind the scenes. This means that translations can be created, updated, deleted, or published independently of any other assets in a translation set. (Publishing of translations is subject to localization policies defined for the publishing channel.)

When translations are published, they’re available in the content delivery API. Furthermore, published translations continue to retain information about the translation relationship they have with the other assets in the translation set that have also been published.

The following topics provide more information about multilingual content and translations in Oracle Content and Experience:

Language Attributes of Assets

The content delivery and management APIs express the language and translatability of an asset in a translation set as standard fields in the API payload.

The following example shows the language and translatable fields.


Description of headless_multilingual-content_api-payload.png follows
Description of the illustration headless_multilingual-content_api-payload.png

Discover Available Translations

You can discover the available published translations in the content delivery API by invoking the following variations resource endpoint.

GET
      https:/. . ./content/published/api/v1.1/{id}/variations/language?channelToken=. . .

This produces a collection that is the translation set. Notice that items[] in the following example has two elements, which is the number of assets in this translation set. You can follow the links to each of the assets in the translation set.

{
  "setId": "98F6BD881DF46650E053020011ACE0E4",
  "masterItem": "CORE6BEF829DE27F41AA9ACC0A3B6825D6C9",
  "items": [
    {
      "id": "CORE6BEF829DE27F41AA9ACC0A3B6825D6C9",
      "value": "en-US",
      "links": [
        {
          "href": "http://. . .oraclecloud.com:8080/content/published/api/v1.1/items/. . .?channelToken=. . .",
          "rel": "self",
          "method": "GET",
          "mediaType": "application/json"
        }
      ]
    },
    {
      "id": "CORE8D451A7D43FE401EAC96A80E111406B4",
      "value": "es",
      "links": [
        {
          "href": "http://. . .oraclecloud.com:8080/content/published/api/v1.1/items/CORE8D451A7D43FE401EAC96A80E111406B4?channelToken=abb5f9190dd54a99979a7fa04b5506ba",
          "rel": "self",
          "method": "GET",
          "mediaType": "application/json"
        }
      ]
    }
  ],
  "links": []
}

Fetch a Specific Translation of an Asset

In a client application, you’ll often want to switch to translated content automatically without listing translations.

This can be done in a single call, like the following one:

GET https:/. . ./content/published/api/v1.1/{id}/variations/language/es?channelTpken={. . .}

The response for this request would be the Spanish (es) asset in the translation set. If the client asks for a translation that doesn’t exist, the result would be a 404 error response, as expected. However, you can configure Oracle Content and Experience to fall back to a default language instead of returning a 404 error response. This can be done by associating a localization policy with the channel. If a localization policy with a default language is associated with the channel, then requests for nonexisting translations will return the asset of the default language.

Translation Jobs

It’s often necessary to translate a large number of assets in bulk, possibly using third-party tools or translation teams. Oracle Content and Experience supports this process through translation jobs.

This process involves a number of steps:

  1. First, you add assets to be translated to a translation job, which is a trackable activity through the life cycle of asset translation.
  2. Next, the translation job exports the translatable assets into an export file. This is an archive (zip file) of all contents of the asset that needs to be translated. A third party or an integration can inspect this archive and provide the desired translations. These translations are themselves added to the same archive as part of the translation process.
  3. The archive with the translated assets is then imported back into Oracle Content and Experience. Upon import, translated assets are created and linked to their master/original assets and with each other to create translation sets.
  4. The translations are now in Oracle Content and Experience, linked to their master asset and available for further processing and publishing.

Description of headless_multilingual-content_translation-jobs.png follows
Description of the illustration headless_multilingual-content_translation-jobs.png