Open joshua-mf opened 3 years ago
Hi @joshua-mf, thanks for filing this! We're open to making STPLocalizationUtils.overrideLanguage
public in a future update, though I need to dig into the details and make sure we aren't missing any edge cases. For now, you should be able to interpret the error codes to return your own error messages, though I realize that isn't optimal.
Accept-Language
header.Hi @davidme-stripe, do you know if there's work in progress to making STPLocalizationUtil
public?
@davidme-stripe any news on the above please?
Hi @davidme-stripe @yuki-stripe do you know if there is any progress on exposing an interface for STPLocalizationUtil to clients?
Hi! Is there any way of overriding the SDK language? Thanks.
Summary
Our app currently allows users to change languages without killing/restarting the app. The SDK doesn't automatically handle this scenario from the looks of it. So any error that is thrown from Confirming Payment is always in the previous language.
After taking a look through the SDK codebase and changing the access modifier for
STPLocalizationUtils
and callingSTPLocalizationUtils.overrideLanguage(to: languageCode)
, the SDK language changes for local errors as expected and all errors are localised to the selected language. But not for server error messagesThis seems to happen if the PaymentIntent requires authentication(CVC re-collection in my case), then declines. I get the error localizedDescription not localised.
Is there another way of overriding the SDK language? Any help would be appreciated. Thanks
iOS version
14.4
Installation method
Cocopods
SDK version
21.2.1
Other information