Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change the language of the checkout form in Stripe?

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 am 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>
like image 471
Lucas Avatar asked Mar 16 '15 23:03

Lucas


1 Answers

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.

like image 144
koopajah Avatar answered Sep 21 '22 14:09

koopajah