#molley_paymentelement-locale
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1276233271277129818
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- molley_unexpected, 2 days ago, 6 messages
We are currently testing in test mode and we do see localization of the error messages. Some errors aren't but these should only be raised in test mode.
The error is definitely not normal. Can you provide the exact steps that return this error?
What locale are you using?
Like I am trying in French and I see French. I don't really get what the localized version is saying with bancaria de EE. UU is it USA in your locale?
molley_paymentelement-locale
Even with locale: 'es' I see a localized version:
Let me know once you have specific details to reproduce @vapid mirage
I change the locale in <Elements locale: "es">. Click on "Cuenta bancaria de EE. UU." Click one of the banks listed. It opens a modal that lets me know we're using Stripe to connect accounts. When I close the modal the error generates.
Sorry the screen recording got cut off at the top but I just close the modal
In English it's showing US Bank Account. I think we may have it configured so we only accept US Bank Accounts
Are you in Live mode or Test mode?
I have my local environment pointed to the live key
We don't currently have a production environment set up yet, but clients wanted me to confirm the translations
can you try in Test mode for a sec to see if it works?
Like I try that exact flow in Test mode and I get the error in Spanish
Sure one min! I'm fairly sure i'll see English since that's what my original ticket was asking about
yeah I just want to make sure since I clearly see the error in Spanish there so there has to be a difference in set up somewhere otherwise
hum do you have a URL I can load to compare?
Also super annoying that none of that modal/flow is even localized ๐
It's not public facing so I don't think I have a way to share a url with you atm
Any way you can reproduce quickly outside of your environment with jsfiddle or similar? That would really help
I tried a few different initialization modes and can't reproduce right now so I don't get what could be causing this
I'll try to spin something up but in the meantime, I think this is the meat of what we've implemented
stripe={stripePromise}
options={{
mode: "setup",
currency: "usd",
paymentMethodOptions: {
us_bank_account: {
financial_connections: {
permissions: [
"balances",
"ownership",
"payment_method",
"transactions",
],
},
},
},
locale: i18n.language === "es" ? "es" : "en",
}}
>
{children}
</Elements>
<PaymentElement
options={{
defaultValues: {
billingDetails: {
address: {
country: "US",
},
},
},
layout: {
type: "tabs",
defaultCollapsed: false,
radios: true,
spacedAccordionItems: false,
},
paymentMethodOrder: ["us_bank_account", "card"],
}}
onChange={(event) => {
if (event.complete) {
setFormComplete(true);
} else {
setFormComplete(false);
}
}}
/>```
trying your code but not getting much luck. Will circle back in a bit
nope I can't seem to repro at all I'm sorry. I tried mostly your exact code, just not in React because React makes no sense to me but I get Spanish everywhere.
I would need to see your code live on a page somewhere where I can try it. Can you make that happen?
Yeah I'll circle back to you in a bit with a jsfiddle or something similar
okay now that does repro the error. Someone on my team will follow up (I have to run soon) but that's exactly what we needed!
Thank you!
Okay I figured it out
You are passing the locale to the PaymentElement options which... shouldn't work but seems to lol.
Okay what should we do instead?
You are supposed to pass the locale when you initialize Stripe.js stripe={loadStripe('pk_test_123', { locale: 'es' })}
Actually I think we send it to the Elements object not the PaymentElement . Would that change anything?
yeah it's related. Remove it entirely and pass it on loadStripe() like I did above