Closed waelsaad closed 1 year ago
Right to left layout is supported via the .layoutDirection environment variable. It will automatically change based on the user locale but you can also change it manually.
For example
HFlowLayout(alignment: alignment) {
ForEach(items) { item in
Text(item.value)
}
}
.environment(\.layoutDirection, .rightToLeft) /// manually set it here
A couple more points:
As right to left support is already included I'll mark this as closed.
Thank you Ryan, I appreciate your response. yes I have got the right to left working now. Amazing, and noted the other comments.
Hi,
I have closed my other issue to do with performance and would like your assistance please to let me know if FrameUp is already supporting justifying blocks of text for languages that are right to left.
I usually place the following 2 lines and it works but it didn't with the HFlow Layout.
I am happy to modify FrameUp myself if you guide me as to what can be done. I am hoping its simple enough to do. Thank you.