woocommerce / woocommerce-gateway-stripe

The official Stripe Payment Gateway for WooCommerce
https://wordpress.org/plugins/woocommerce-gateway-stripe/
234 stars 206 forks source link

Can't choose the language for Stripe Checkout #512

Closed madeincosmos closed 6 years ago

madeincosmos commented 6 years ago

Affected ticket(s)

937969-zen

What I expected

To be able to translate the credit card placeholders, especially in a multi-language environment (from MM/YY to MM/AA, for example).

What happened instead

The option in WooCommerce settings to choose Stripe Checkout language is gone:

Screenshot Screenshot: http://cld.wthms.co/KL68BP

Here is how it used to look (and still looks like in our docs):

Screenshot Screenshot: http://cld.wthms.co/IVVy7w https://docs.woocommerce.com/document/stripe/#section-4

Now no matter what language I set in WordPress settings, the Stripe Checkout is always in English

Steps to reproduce the issue

  1. Enable Stripe Checkout,
  2. Switch site language to Norwegian,
  3. Proceed to checkout and observe

Screenshot Screenshot: http://cld.wthms.co/yfZeml

Reproduced on Pressable with WC 3.3.1 & Stripe 4.0.5


roykho commented 6 years ago

In 4.0, it will use the WP setting. It does work unless perhaps they have some override in their Stripe dashboard.

madeincosmos commented 6 years ago

Thanks! How do I check if I have an override? Happens on my account & site too.

roykho commented 6 years ago

You can see here working when I switch to Japanese

Thanks! How do I check if I have an override?

I am not exactly sure. That is just what I've heard people on forums fixing it.

roykho commented 6 years ago

Also note it may not support all languages.

madeincosmos commented 6 years ago

Okay, looks like Norwegian is not on that list, so it defaults to English:

In addition to English, Checkout now speaks Japanese, German, French, Simplified Chinese, Spanish, Italian, and Dutch.

https://stripe.com/blog/checkout-in-more-languages

Thanks for checking, we're good to close this now.

roykho commented 6 years ago

@madeincosmos docs updated!

joelwills commented 6 years ago

This isn't working for Norwegian when it should.

For example French:

Screenshot

Link to image: http://joelwills.com/grNBfa

Dutch:

Screenshot

Link to image: http://joelwills.com/TmWw9g

But not Norwegian:

Screenshot

Link to image: http://joelwills.com/08Ixyq

According to Stripe, Checkout is available in:

Simplified Chinese (zh) Danish (da) Dutch (nl) English (en) Finnish (fi) French (fr) German (de) Italian (it) Japanese (ja) Norwegian (no) Spanish (es) Swedish (sv)

https://stripe.com/docs/checkout#supported-languages

So it looks like we might not be correctly passing no as the language when WordPress is set to Norwegian. Possibly because it's nb_NO (Norsk bokmål) in WordPress and not no?

I haven't checked all the other languages yet, let me know if you need me to. Or if this should be a new issue.

cc: @roykho @madeincosmos

roykho commented 6 years ago

@joelwills Stripe checkout is only available in https://stripe.com/blog/checkout-in-more-languages

joelwills commented 6 years ago

@roykho That's over 2.5 years old. I listed the languages Stripe Checkout is in the message above from directly from:

https://stripe.com/docs/checkout#supported-languages

Stripe also looked at it for the user and said it looks like the language isn't being passed correctly.

iamgabrielma commented 6 years ago

I see this is closed and will be fixed in 4.0.6 , however as followup the customer contacted us with Stripe answer in 952887-zen, just pasting it here to add to the issue:

tl:dr;

The data_locale parameter that would do this only applies Stripe-side if a Standard Checkout is used. Since the payments in question are all done through the 'source' flow, you are not using the standard Checkout solution. Rather, this is something WooCommerce built.

Also the locale parameter receives the location of the IP address from which the purchase is made, i.e., Norway in this case, and this isn't a parameter that depends on where the Stripe account is - it depends on where your customer is.

roykho commented 6 years ago

@iamgabrielma not relevant because in this issue we are indeed talking only about the Stripe Checkout, not the sources he mentioned.