Skip to main content

Localization APIs

Introduction

Custom localization can be a crucial topic to amend SmartPay towards your business and journey specific needs.

To give you full control about any localization, we introduced our /payment/localization endpoint. It allows you to:

  • Get currently valid localization data (if use first time, it will return SmartPay default language configuration).
  • Upload custom localization data for some or all supported languages.
  • Upload languages which are not supported by SmartPay default language set.
  • Delete all custom localization data to transition back to SmartPay standard localization.
info

Usage of this endpoint is optional. If you do not opt for this, you'll automatically use the SmartPay default localization for all currently supported languages with a fallback to English in case the consumer's language is currently not supported.

Localization concept

To organize localization, we work with a JSON formatted data object consisting of:

  • Basic merchant information & version timestamps
  • culturesEnabled array holding the actual localization data per stringID

The cultureEnabled object is prefilled with all SmartPay default localizations, whereby one culture is the smallest entity.

Meaning, if you would like to change only one StringID in en-EN language, you would first get the current default localization (perhaps containing en-EN, de-DE and es-ES). Then you would update the StringID in en-EN and post the entire en-EN localization (consisting of the custom value and remaining default values) back to SmartPay. In this case, SmartPay will use your customer en-EN localization but still the default de-DE and es-ES.

Eventual updates to the default localizations are in this case automatically reflected to de-DE and es-ES - en-EN remains in the state which you have posted, as you have claimed control.

Only exception to this rule is, if we would add new StringIDs (e.g., due to journey changes). If this happens, the default StringIDs will also be promoted to your custom file, to protect your journey without immediate interaction from your side.

In addition, you may always revert to default localization by using DELETE /payment/localization.

info

Any update of default localization and added StringIDs will be added to the changelog and highlighted within the deployment notification. Make sure to subscribe to status page to receive those updates.

If you create currently not supported languages, please specify the language using RFC-4646 declaration (e.g., de-DE). Remark, currently SmartPay only evaluates the language code "de" but not the county code. Support of the full combination will be added in a later release.

Default Language vs Fallback Language

Default language are all localizations, which SmartPay provides by default. Currently, these languages are

  • de-DE,
  • en-EN,
  • es-ES,
  • fi-FI,
  • fr-FR,
  • it-IT,
  • pl-PL,
  • ro-RO and
  • sv-SV.

Fallback language is en-EN and will be used if a not existing localization or stringID is requested.

Localization APIs

Please refer to our API-Reference for more details: