It seems to me that English texts will get better hyphenation if the system language in macOS is set to English. It is hard to be sure, but I think that when my system is set to Swedish, I see a lot more hyphenations like "somet-hing".
This is on macOS Big Sur, in an NSTextView with hyphenation switched on by setting hyphenationFactor to 1 on an NSParagraphStyle object in an NSAttritributedString, not a web view or anything like that. The application is not localized, so the app language is English. Setting NSAccessibilityLanguageTextAttribute to "en-US" seems to have no effect.
I'd like to know if anyone can confirm this, and if so, is there anything to do about it?
This is on macOS Big Sur, in an NSTextView with hyphenation switched on by setting hyphenationFactor to 1 on an NSParagraphStyle object in an NSAttritributedString, not a web view or anything like that. The application is not localized, so the app language is English. Setting NSAccessibilityLanguageTextAttribute to "en-US" seems to have no effect.
I'd like to know if anyone can confirm this, and if so, is there anything to do about it?
I got this reply on StackOverflow:
I guess that is as close to a fix for this as I am going to get.NSAttributedString reads the language from NSUserDefaults with key NSHyphenationLanguage. This is undocumented and may not work in every version of macOS.