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:
- launch app in english
- check the checkout page
- change language to arabic
- 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
PFA -> app launched in arabic mode then language changed to english
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.