How can I find the current Windows language from cmd?

前端 未结 8 1062
囚心锁ツ
囚心锁ツ 2021-02-04 12:02

I would like to run a script for each language. I need a way to find which os language is being used, using batch files. Both on windows XP, and on Windows 7.

相关标签:
8条回答
  • 2021-02-04 12:36

    In Windows 10 1903, the current user's language setting seems to be found in "HKCU\Control Panel\International\LocaleName"

    0 讨论(0)
  • 2021-02-04 12:38

    The below code fixed my issue. It works on Windows Server 2003 and Windows 7

    FOR /F "tokens=3 delims= " %%G in ('reg query "hklm\system\controlset001\control\nls\language" /v Installlanguage') DO (
    IF [%%G] EQU [0409] (
      ECHO English install language detected
    ) ELSE (
      ECHO Some other language detected
    )
    

    Hope it helps!

    0 讨论(0)
提交回复
热议问题