I’m currently trying to localize one of my Mac apps for Right-to-Left languages.
In Xcode, to test this, I set the language to ‘Arabic’ in the scheme, which then displays the language and mirrors the layout accordingly.
I have two questions about this:
-
macOS titlebar buttons: In the title bar at the top, shouldn’t the Close and Minimize buttons also be on the right side (mirrored)? How can I test this?
-
Numerals: My UI still displays Latin numerals (123). I know this is correct in some Arabic-speaking regions, but I’d also like to test cases where Arabic-Indic numerals (١٢٣) are used. Is there a way to configure the scheme to test this?
On macOS, title bar buttons are drawn in a way that is consistent across all apps.
If your macOS language is right-to-left, they will be moved to the right-hand side.
So setting the app language wouldn’t be enough, you’d have to set your user session language to Arabic as well.
Unfortunately, there is no way to test numerals via scheme settings. Would you like to file a feedback via Feedback Assistant about that and share the FB number?
Here are some alternatives:
- setting it in your macOS settings when Arabic/Hindi/… is your preferred language,
- setting the locale manually
- via the SwiftUI environment for instance a locale with the identifier
ar_AE@numbers=arab
- via launch arguments
-AppleLanguages "(hi)" -AppleLocale "hi_IN@numbers=deva"
- via user defaults on your domain or the global domain
- via the SwiftUI environment for instance a locale with the identifier