Link Search Menu Expand Document

Campaign localisation and languages

When editing a campaign in the Spaaza Console portal, the campaign editor has advanced settings including a localisation field. Because there can be many localisation “tokens” for different languages, Spaaza requires that localisations are defined in a JSON file for each campaign where localisation is required.

For information on viewing localised strings in campaigns, please see the campaign field localisation section of the campaigns documentation.

The JSON format used allows definition of default and specific tokens at a per-field level for campaign. For example, it is possible to specify many different translations of the value used for a campaign title and for text used for vouchers in the voucher_text field.

Example JSON is provided below

{
  "title": {
    "en": {
      "default": "Sample Basket Campaign",
      "en-UK": "Sample Basket Campaign UK",
      "en-US": "Sample Basket Campaign US"
    },
    "nl": {
      "default": "Voorbeeld Basket Campagne",
      "nl-NL": "Voorbeeld Basket Campagne NL",
      "nl-BE": "Voorbeeld Basket Campagne BE"
    },
    "fr": {
      "default": "Exemple Campagne Panier",
      "fr-FR": "Exemple Campagne Panier français",
      "fr-BE": "Exemple Campagne Panier belge"
    }
  },
  "voucher_text": {
    "nl": {
      "default": "Voorbeeld voucher",
      "nl-NL": "Voorbeeld voucher NL",
      "nl-BE": "Voorbeeld voucher BE"
    },
    "fr": {
      "default": "Bonne Exemple",
      "fr-FR": "Bonne Exemple français",
      "fr-BE": "Bonne Exemple belge"
    }
  }
}