Is there any universal method to detect the OS default language? (regardless what is the OS that is running the code)
import os
os.getenv('LANG')
The above code works under Linux, does it work under other OS?
Is there any universal method to detect the OS default language? (regardless what is the OS that is running the code)
import os
os.getenv('LANG')
The above code works under Linux, does it work under other OS?
Better use windows command line...
import os
current_locale = os.popen('systeminfo | findstr /B /C:"System Locale"').read()
see https://www.tenforums.com/tutorials/132175-see-current-system-locale-windows-10-a.html