@bgm That would be good! By the way, I've noticed that it has started picking up my browser locale (PT) sometimes without me making any changes. Also worth checking out the recent change that enabled multilanguage on mosaico.
Default is 'auto' (Stripe detects the locale of the browser).
My browser was not correctly configured. However, on one client this is particularly sensitive, with people who may have very different languages as their primary language. I would be tempted to force the language, and if it's a non-supported language, leave it to "auto".
I have some problems getting the Stripe dialogs shown in German language. Basically I checked the whole software-chain: The browser, WordPress (latest version) and CiviCRM (latest version) are all set to German. But the Stripe Elements input box and messages are all in English.
What I suspect is that the value for the locale ends up as "de_DE" instead of the plain "de" which Stripe is expecting, so they are not recognizing the language and fall back to English. "de_DE" was the value set in CRM.vars.stripe.locale when I checked it in the browser console.
Tentatively, I replaced the two calls to CRM_Core_I18n::getLocale() by just setting 'de' as the value and I had some partial success. At least the input box for the credit card number contains German text, the subsequent 3D secure test dialog is still in English. However, I am not sure if this UI-placeholder is always in English and the real UI will show the customer language.
I am wondering if I am the only one having trouble with the language of Stripe Elements? Maybe I am just missing a setting somewhere?
@mattwire I can confirm that the patch is working as expected. The Stripe entry field and the related error messages (e.g. incomplete card number) are now displayed in German. I am still struggling a bit with the messages in the sweetalert boxes, my Transifex translations have not been picked up and word replacement don't work neither. But this is a totally separate issue and could be my setup and lack of experience in this area, so I will dig into this a bit more before asking questions.