docs
  1. SCAYLE Resource Center
  2. Developer Guides
  3. Checkout
  4. Translation

Translation

For localization within your Checkout application (such as input fields in the address form), customizations are handled via linked translations to each object, text paragraph, and notification.

Translations are collected and released through the Crowdin platform, then dynamically loaded into Checkout.

Crowdin and Checkout.

You will get the URL and access rights to Crowdin from your SCAYLE Account Manager. The project includes pre-configured standard keys in the default language (EN).

Localize Content in Crowdin

  1. Once logged in to Crowdin, select a language in your project, in this example English, United Kingdom
  1. Go to the Checkout Frontend folder to open the translations.json file.
  1. Click on translations.json in a language folder and a mask opens with strings that you can translate. Choose a string and add the translation.

The language folders will be set up for each locale/language (e.g., “French, Switzerland”, “German, Switzerland”, “German, Austria”, “Dutch”, “Bulgarian”). Translations should be added depending on the applied configurations directly to each relevant string. For instance, if you have a hidden phone number input field, then related translations are not needed.

Custom keys

You cannot create your own translation keys. If you do, they will be deleted again automatically after some time.

If you need keys to reference in the dynamic field config you can use payment.termsAndPrivacy or auth.newsletterSignUp or, if these don't match your use case, you can use one of the keys custom1 to custom10.

If you notice other missing keys like for carriers, shipping options, collection point types or payment options, please report them to the checkout team and they will be added.

Placeholders

Checkout uses ICU Message syntax to manage placeholders. This allows you to express the subtleties of spelling, grammar, and conjugation for each language.

With this format you could build messages like this:

 Welcome back, {salutationCode, select, f {Mrs} m {Mr} other {}} {lastName}!

So the system picks up the correct salutation (e.g., Mr./Mrs. based on the gender). The example below shows the format {key, plural, matches} where the key is earnings and the # token is used for the numeric value in the output of the match.

Crowdin: placeholders.

Placeholder are in general references in the source source string - as above in the screenshot. {firstName} and {firstName} are additionally available in the following entries:

  • auth.returningCustomer.welcomeBack
  • auth.returningCustomer.differentAccount

Release Translations

After you are finished with the translations you need to release the changes.

  1. On Crowdin home, select the tab translations
  1. Click on Over-The-Air Content delivery, and then release

After you have released the changes, updates will be dynamically loaded to Staging or Production via Checkout APIs.

There can be a delay of 1-2 hours (approx.) for loading the content.

Translation updates can be done at any time as no specific deployment is needed for that. In case the Crowdin platform is not available, there is a translation fallback mechanism in place. In this case, the latest available data will be used.

You can also refer to the Internationalization chapter about translation.