checkout / frames-ios

Frames iOS: making native card payments simple

Home Page:https://www.checkout.com/docs/integrate/sdks/ios-sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Payment page alignment or text based on language switching is not updating

arbintajte opened this issue · comments

Describe the bug
When app language is changed from Arabic to English or English to Arabic the checkout page format is not updating as per language without killing the app.
suppose app was in english and user changed to Arabic then sometimes the placeholder Alignment will be as per Arabic and textfield as per english and vice versa.
If app is killed and launched again on language update everything works fine as expected.

To Reproduce
Steps to reproduce the behavior:

  1. launch app in english
  2. check the checkout page
  3. change language to arabic
  4. check the checkout page again

Expected behavior
If language change is done in application then it should behave as per language updated without killing or relaunching the application

PFA -> app launched in english mode then language changed to arabic

Simulator Screen Shot - iPhone 14 Pro - 2024-01-05 at 13 42 28

PFA -> app launched in arabic mode then language changed to english
Simulator Screen Shot - iPhone 14 Pro Max - 2024-01-05 at 13 40 51

and vice versa

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: iPhone 14 Pro Max
  • OS: iOS 16.0

Hi @arbintajte ,
Appreciate your suggestion regarding the scenario where a user changes the device language while the app is open—an edge case that may present unique challenges.
While implementing this feature may face challenges, we will certainly consider it for future enhancements.
Thank you for bringing it to our attention!

Hi @arbintajte , please try this in your app before opening payment view controller then everything will be fine. let us know your feedback

 UIView.appearance().semanticContentAttribute = isRTL ? .forceRightToLeft : .forceLeftToRight

Is there any method to set the language like English to Arabic or reinitialise the checkout payment page because language change is effecting after kill and launch only.

The app is responsible for changing the language. You can try to add the next line before opening the payment screen if you want change the language without kill and launch.

 UIView.appearance().semanticContentAttribute = isRTL ? .forceRightToLeft : .forceLeftToRight

hey, closing this Issue since there hasn't been an activity for a long while. Feel free to re-open it or to create a new one.