Find out the language windows was installed as

前端 未结 4 975
无人及你
无人及你 2021-01-12 18:33

I have a problem where the user has set their locale (German) which is different that the Language Windows was installed as (English). Is there a way to discover what langua

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-12 18:40

    Windows has the concept of the "UserLanguage" and the "SystemLanguage". What you are asking for is the SystemLanguage. Get that, and you'll have the correct answer.

    Update: The Win32 function you want is GetSystemDefaultUILanguage()

    Retrieves the language identifier for the system default UI language of the operating system, also known as the "install language" on Windows Vista and later.

    http://msdn.microsoft.com/en-us/library/dd318123(VS.85).aspx

    Note that Windows Installer can query the property "SystemLanguageId". (in case you're interested from an instller point of view)

提交回复
热议问题