Skip to main content
This article explains how you can translate your Checkout so players can view content in their preferred language. To learn more, see About Translations.

Step 1 | Add languages

Add your languages in the Publisher Dashboard.

Step 2 | Set translations

Set translations in the Publisher Dashboard directly, or programmatically using the Translations API service.

Step 3 | Pass player’s locale to the Checkout

Determine the player’s locale, and then when rendering the Checkout component, pass the player’s language to the Checkout component using the locale property. The format of the locale value depends on how the language’s Display Name is configured in the Publisher Dashboard:

Display Name differs from the standard ISO code

If the Display Name differs from the standard ISO code, use the following format:
locale = displayName;languageISOcode
For example, if you added Spanish as a language and set the Display Name to “spanish”, set the following:
locale = spanish;es

Display Name matches the standard ISO code

If the Display Name matches the standard ISO code, use the ISO code directly:
locale = languageISOcode
For example, if you added Spanish and set the Display Name to “es”, set the following:
locale = es

Complete example

Below is a complete code example for displaying the Checkout in the player’s language:
<AppchargeCheckout
  checkoutUrl={parsedUrl}
  locale="spanish;es"
  referrerUrl={window.location.protocol + "//" + window.location.host}
  onClose={() => console.log("Checkout closed")}
  onOrderCompletedSuccessfully={(params) => console.log("Order completed", params)}
/>