I have a Java application on macOS that uses SWT. Sometimes this application needs to ask for a filename. Now, while SWT has a file dialog, this is sort of broken in recent versions.
So I made my own file dialog that uses JNA to create an NSSavePanel via the Objective C runtime. This way I can get rid of the "Tags" field and handle file extensions correctly. Works like a charm, except: my macOS is in German, but the NSSavePanel is in English (as is the one from SWT). How do I get the dialog to use the system's language?
The application also uses a custom Java launcher. I haven't tried if tweaking the available languages in the launcher's build file would help, because for various reasons I'd rather avoid rebuilding that. Is there a way to achieve this with Cocoa (or Core Foundation) APIs only?
Edit: we've checked on a system with High Sierra and the dialog is in German there