So I'm trying to figure out what is the best approach to detecting what is the current OS language. From what I've read and tried so far, it looks like CEF starts up without in any way trying to figure out what is the currently selected OS language. It always defaults to --lang=en-US.
I can get the lang value from Javascript by calling navigator.language, so it's good that I can access it.
Now, what would be the best approach to set the --lang/CefSettings.locale to the correct OS language? Do I need to make native system calls myself in order to get the current language, or is there something that's already built-in?