In the Mail settings one can choose one of the default sounds located at /System/Library/Sounds
. Playing them is easy, e.g. with NSSound(named: "Purr")?.play()
, but how can I show a localized name for those sounds as Mail does? I couldn't find any way of getting a localized name. Would I have to manually translate each one to each supported language?
Asked
Active
Viewed 41 times
1

Nickkk
- 2,261
- 1
- 25
- 34
-
1Mail uses regular localization using `Localizable.strings` files, so that would be a yes. – red_menace Mar 26 '23 at 16:12
1 Answers
1
These translations are stored in these Plist files as of macOS Ventura:
/System/Applications/Mail.app/Contents/Resources/Localizable.loctable
and
/System/Library/ExtensionKit/Extensions/Sound.appex/Contents/Resources/AlertSounds.loctable
These are dictionaries. You can inspect their contents by adding .plist
extension to the file name.
I’d either copy the values from these dictionaries or try loading them programmatically at runtime. Note that the paths and contents can change between macOS releases.

pointum
- 2,987
- 24
- 31