系统的显示语言是英语,locale是zh-CN,怎么获得当前的显示语言,也就是英语。

解决方案 »

  1.   

    LANGID lngid = GetUserDefaultUILanguage() ;查看
    #define LANG_ENGLISH 0x09
    #define LANG_CHINESE 0x04不过还有Sub ID,就是语言的子种类,比如
    #define SUBLANG_CHINESE_TRADITIONAL 0x01    // Chinese (Taiwan) 0x0404 zh-TW
    #define SUBLANG_CHINESE_SIMPLIFIED  0x02    // Chinese (PR China) 0x0804 zh-CN
      

  2.   

    还有一个 GetSystemDefaultUILanguage(void);
      

  3.   

    This function retrieves the system default language identifier.   LANGID GetSystemDefaultLangID(void);
      

  4.   

    最好的办法,就是获取程序explorer.exe的语言版本。