What is the correct way of knowing operating system language (locale) from java code?
I have tried
Locale.getDefault()
System.getProperties(\"user.l
How about using the default locale?
Locale locale = Locale.getDefault();
String lang = locale.getDisplayLanguage();
String country = locale.getDisplayCountry();
This returns me my current language and country as per the Windows systeminfo command. Is this what you're looking for? (If you want the 2-character codes for language/country, you can just use getLanguage() or getCountry()).