In the mac general setting, we can provide the language preference for an individual application like in the image below, I have provided for TextEdit app.
Now based on the system preferred languages, TextEdit will have a default language. However if I explicitly set the language for TextEdit (arabic in my example), then the application will use that language. I wanted to identify in my program the language that an app is currently running in. I have tried the below code, but it always return 'en', even after my preference is set to 'Arabic'.
let u = URL(fileURLWithPath: "/System/Applications/TextEdit.app")
let b = Bundle(url: u)!
let textedit_preference = b.preferredLocalizations
print(textedit_preference) //["en"]
How can I identify what language is being set by the user for an individual application? I have followed this link but it does not contain this information.