SFSafeSymbols / SFSafeSymbols

Safely access Apple's SF Symbols using static typing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support Right-to-Left localization

n-studio opened this issue · comments

Screenshot 2023-01-26 at 00 08 44

For some symbols such as arrow.up.backward.and.arrow.down.forward.circle, SF Symbol suggests to use Right-to-Left localization to flip the symbol horizontally.

But .arrowUpBackwardAndArrowDownForwardCircle.localized(to: .rtl) will return nil.
Is Right-to-Left not supported?

@n-studio We do support localizing to RTL, but it's only possible if that symbol supports explicit localization. Unfortunately, Apple did not add support for that symbol, it will only be implicit (when the whole app is using a RTL locale).

If you are using UIKit, you can force it using imgView.semanticContentAttribute = .forceRightToLeft

It works great! Thank you!