Testing Right-to-Left localization in a macOS app

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:

  1. 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?

  2. 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?

There seems to be some inconsistencies in RTL for buttons position: see for example: https://bugzilla.mozilla.org/show_bug.cgi?id=1633860

So, you should file a bug report.

For numerals, have a look here:

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
Testing Right-to-Left localization in a macOS app
 
 
Q