Internationalization

Static Texts

The texts in a DPPs can be internationalized by translating the texts in the DPP Publisher.

Note

Since this feature is currently restructured, images and explanation will come soon.

Dynamic Texts

Dynamic texts in a DPP are texts where placeholders are replaced with content of a Tridy payload. The data of the Tridy payload is stored in Narravero but are be strutured by our partners.

To provide internationalized texts for placeholders there are different possiblities, three of which are:

  • Suffix for the keys defining the language

  • A map for each key containing the keys of the fields

  • A map for each value key containing the languages as keys

Which of these options is best depends on taste and on the existing structure in the system that provides the data.

The following examples show the different possibilites.

We have this data we want to internationalize:

{
  "ean": "12345678",
  "productName": "White, fancy Sneaker",
  "price": "123,32€"
}

The ean is static, the rest will be internationalized into German, English and French.

Suffix for Languages

A suffix is a text that is appended to each key telling the language. This could be _de, _en and _fr in our sample (“Sneaker” is international):

{
  "ean": "12345678",
  "productName_de": "Weißer, schicker Sneaker",
  "price_de": "123,32€",

  "productName_en": "White, fancy Sneaker",
  "price_en": "£123.32",

  "productName_fr": "Blanc, fantaisie Sneaker",
  "price_fr": "€123,32"
}

These texts can then be referenced in the translations in the DPP Template like this: ${productName_de}, ${productName_en}, ${productName_fr} (${price_xx} accordingly).

Map for each Language

We can combine all texts in, so called, maps for each language like this:

{
  "ean": "12345678",
  "de": {
    "productName": "Weißer, schicker Sneaker",
    "price": "123,32€"
  },
  "en": {
    "productName": "White, fancy Sneaker",
    "price": "£123.32"
  },
  "fr": {
    "productName": "Blanc, fantaisie Sneaker",
    "price": "€123,32"
  }
}

These texts can then be referenced in the translations in the DPP Template like this: ${de.productName}, ${en.productName}, ${fr.productName} (${xx.price} accordingly).

Map for each Key

We can alternatively group all texts by keys and have the languages as sub-keys:

{
  "ean": "12345678",
  "productName": {
    "de": "Weißer, schicker Sneaker",
    "en": "White, fancy Sneaker",
    "fr": "Blanc, fantaisie Sneaker"
  },
  "price": {
    "de": "123,32€",
    "en": "£123.32",
    "fr": "€123,32"
  }
}

These texts can then be referenced in the translations in the DPP Template like this: ${productName.de}, ${productName.en}, ${productName.fr} (${price.xx} accordingly).