-
Notifications
You must be signed in to change notification settings - Fork 24
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 Support for Right-to-Left (RTL) Languages #26
Labels
enhancement
New feature or request
Comments
@ReenadGh Thx for ur feedback! =) That's nice suggestion for a improvement! |
It would be great to see this support added! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The SwipeActions library currently does not support right-to-left (RTL) languages such as Arabic, Hebrew, or Persian. This limits the usability of the library in applications that require RTL support, particularly in regions where these languages are predominant.
Current Behavior:
Swipe actions only support left-to-right (LTR) configurations.
RTL languages display swipe actions in the same direction as LTR, which can be confusing for users expecting standard RTL behavior.
Expected Behavior:
The library should automatically adjust swipe directions based on the device's locale settings.
For RTL languages, the swipe actions should be mirrored to match the expected interaction patterns, with primary actions swiping from the right and secondary actions from the left.
Steps to Reproduce:
Set your iOS device language to Arabic (or another RTL language).
Implement SwipeActions in a SwiftUI view.
Observe the swipe direction and layout.
Example Code:
Proposed Solution:
Add support for detecting and adapting to the device's layout direction using SwiftUI's .environment(.layoutDirection, .rightToLeft) modifier.
Implement conditional logic in the swipe action handling to adjust swipe directions for RTL languages.
Providing RTL support will enhance the library's accessibility and user experience for a broader audience, aligning with iOS's built-in RTL support capabilities.
The text was updated successfully, but these errors were encountered: