问题
Is there any way to determine the local culture of a PC (such as en-US) without running an application? I tried looking in Control Panel | Regional Settings (running WinXP), but I don't know how the choices there map to the PC's culture.
I'm looking for a solution that doesn't require creating an .exe, such as running a command from the command prompt (not PowerShell), or a VbScript or JS file (as long as we are getting the real culture and not IE settings.)
Thanks
回答1:
To view the information from the explorer interface follow the instructions in the other answers.
For the internal details, read on:
The locale is save per user under HKCU\Control Panel\International\
under the value LocaleName
To quickly view your locale run this from the command line:
REG QUERY "HKCU\Control Panel\International" /v "LocaleName"
obviously you can query this information any way you like (cmd, powershell, vbs, c# etc...)
回答2:
Look at the System Information tool under Accessories->System it tells you locale in there.
来源:https://stackoverflow.com/questions/863826/determine-local-culture-of-a-pc-without-creating-an-application