7

I have noticed that with the Stripe checkout form, the language seems to be fixed in English.

Is there a way for me to change this language to, for example, Spanish, Japanese or Chinese?

I'm currently using the default form code on the Stripe documentation:

<form action="/charge" method="POST">
  <script
    src="https://checkout.stripe.com/checkout.js" class="stripe-button"
    data-key="pk_test_variable_here"
    data-image="/img/documentation/checkout/marketplace.png"
    data-name="My Company Pty Ltd"
    data-description="2 widgets"
    data-currency="aud"
    data-amount="2000">
  </script>
</form>
Super Kai - Kazuya Ito
  • 22,221
  • 10
  • 124
  • 129
Lucas
  • 16,930
  • 31
  • 110
  • 182

4 Answers4

5

EDIT: Updating the answer since it's the accepted one to make sure it's visible.

Stripe released a feature that allows you to have Stripe Checkout display in other languages automatically.

The easiest solution is to pass data-locale="auto"to display Checkout in the user's preferred language, if available. English will be used by default. You can also force a specific locale in data-locale as long as it's one officially supported by Stripe.

koopajah
  • 23,792
  • 9
  • 78
  • 104
  • It should be noted that this does not change the label of the pay button that still says "Pay with Card". – Avatar Mar 08 '18 at 07:05
5

Late answer but I think it can help someone. Add line: data-locale: "language" to your script. Example:

<form action="/charge" method="POST">
  <script
    src="https://checkout.stripe.com/checkout.js" class="stripe-button"
    data-key="pk_test_variable_here"
    data-locale="fr"
    data-image="/img/documentation/checkout/marketplace.png"
    data-name="My Company Pty Ltd"
    data-description="2 widgets"
    data-currency="aud"
    data-amount="2000">
  </script>
</form>
koopajah
  • 23,792
  • 9
  • 78
  • 104
Hix.botay
  • 387
  • 3
  • 10
1

Stripe released a new version of Checkout last year which does language localization automatically based on the browser's locale setting. You can also manually override this behavior by passing in a locale when creating a Checkout Session.

0

You can use "locale" parameter to change the language of the checkout on Stripe.

Super Kai - Kazuya Ito
  • 22,221
  • 10
  • 124
  • 129