How to convert Mac OSX app appearance from LTR to RTL while using arabic localization without changing system Language?

In my Mac OSX app, I am giving option to change application language(localisation), to user, for which I have changed bundle programatically when user change the language. Now the issue is, when choosing Arabic, the texts get converted to arabic text from English but the app still appears in Left to Right instead of Right to Left.

I want my app to change from LTR to RTL, without user changing their system language to Arabic.
I have also used NSForceRightToLeftWritingDirection, but I need to relaunch my app twice to see the change in app.

[[NSUserDefaults standardUserDefaults] setObject:@"YES" forKey:@"AppleTextDirection"];
[[NSUserDefaults standardUserDefaults] setObject:@"YES" forKey:@"NSForceRightToLeftWritingDirection"];

How can I change app appearance from LTR to RTL, without changing system language and without relaunching app twice?

Is there any other way I could use instead of using NSForceRightToLeftWritingDirection?

Replies

It's not advisable to give the user the option to change the language within your macOS app. Recent version of macOS give users the option to change their preferred language for a particular app by going to System Preferences > Language & Region > Apps and adding the language customization for the app there.