Localization

Localization of content within Space Invoices is categorized into three areas: user content, non-user content, and default localization.

To localize content, pass a locale flag in requests (e.g., ?l=LOCALE) when downloading PDFs or sending documents via email. The locale setting influences the static content of PDF elements, user-provided content such as document items, and email messages.

If no locale is provided, the Organization's default locale will be used.

Supported locales

The following locales are currently supported for document PDFs.

If you require a specific locale that is not listed, please contact us. We typically add newly requested locales within 2-4 working days.

en - English
de - German
fr - French
it - Italian
nl - Dutch
sl - Slovenian
hr - Croatian
et - Estonian
lv - Latvian
sk - Slovakian
cs - Czech
ro - Romanian
po - Polish
sr - Serbian

Localizing user content

Localizing user content involves adding and utilizing translated content for user-defined data, such as Items and Documents.

To localize specific data like an Item, you need to add an l10n property to the respective Item. If this Item is later included in a document, the translations will be automatically applied.

Below are example on how to localize elements of a Document or an Item

Localizing Document content

In addition to the main content provided for a document, an extra object containing localized content can be submitted when creating or updating the document. This localized content is utilized when downloading a PDF in a chosen language. If a specific localization is not available, the API will default to the original content.

Document content that can be translated includes the note, signature, and footer. For document items, the name, description, and unit can be translated.

When content is automatically populated into a document from defaults or items, the localized content will also be copied if available for the default or item being used. This feature enables you to manage and present document content in multiple languages seamlessly, providing a tailored experience for your international clients.

Example localized Document content

    
      {
  "_documentItems": [
    {
      "name": "Default english name",
      "description": "Default english description",
      "l10n": {
        "name_de": "German name content",
        "description_de": "German description content"
      }
    }
  ],
  "note": "Default english note content",
  "signature": "Default english signature content",
  "footer": "Default english footer content",
  "l10n": {
    "note_de": "German note content",
    "signature_de": "German signature content",
    "footer_de": "German footer content"
  }
}    
  

Localizing Item content

In addition to the main content provided for an item, an extra object containing localized content can be submitted when creating or updating the item. This allows you to have translations for the item's name, description, and unit.

When item content is automatically populated into a document, the localized content will also be copied over if it is available for the item in question. For more information on localizing document content, please refer to the previous section.

Example localized Item content

    
      {
  "name": "Some item",
  "description": "Some item description",
  "price": 1000,
  "l10n": {
    "name_de": "German name content",
    "description_de": "German description content"
  }
}    
  

Localizing Defaults

Refer to the Defaults section for more information.

Please note that within the l10n property, Defaults have different key names compared to other user-defined content.

Example localized Default email message content

    
      {
  "name": "email_document_invoice",
  "value": "Default invoice email message",
  "l10n": {
    "email_document_invoice_de": "German invoice email message"
  }
}    
  

Localizing Non-User Content

Localizing non-user content involves translating static PDF elements, such as labels and table headers.

Non-user content is automatically localized based on the locale of the request. For more information, refer to the Intruduction section of this page.