Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a "locale" variable to the options configuration #1535

Open
Didixdan opened this issue Aug 29, 2022 · 2 comments
Open

Add a "locale" variable to the options configuration #1535

Didixdan opened this issue Aug 29, 2022 · 2 comments

Comments

@Didixdan
Copy link

Didixdan commented Aug 29, 2022

Is your feature request related to a problem? Please describe.

I'm actually facing a problem when the errors returning by Stripe Node are all in English. I would like to have to possibility to custom the locale and be able to change the content of property error.raw.message of all the exception.

I want to add the possibility of having the error code respect the "locale" configuration already available in the Stripe.js
https://stripe.com/docs/js/appendix/supported_locales

locale
A locale used to globally configure localization in Stripe. Setting the locale here will localize error strings for all Stripe.js methods. It will also configure the locale for Elements and Checkout. Default is auto (Stripe detects the locale of the browser).

Describe the solution you'd like

Have the same solution as the Stripe.js integration, setting a locale variable in the ?options.
Also, please forgive me if this feature can't be done because it's not doable or if I don't really understand something. Don't hesitate to teach me :)

Thanks you.

Describe alternatives you've considered

No response

Additional context

No response

@remi-stripe
Copy link
Contributor

@Didixdan Thanks for writing in! This is something we've heard in the past but we don't have plans to implement for now. Most server-side errors are aimed at the developer of the integration, not the end-customer. The errors for the end customers usually happen client-side via Stripe.js or one of our Mobile SDKs which does support a localized version of those errors.

For now, we recommend that you handle the errors you care about and translate those and keep the rest as a generic error.

I'll tag this as future so that we can collect more feedback though!

@aadeshere1
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants