Windows获取系统语言

#include 
#include 
#include 

using namespace std;

int main(int argc, char *argv[])
{
	string s;
	LCID localeID = GetUserDefaultLCID();
	unsigned short lang = localeID & 0xFF;

	switch(lang)
	{
	case LANG_CHINESE:
		s = "中文";
		break;

	case LANG_ENGLISH:
		s = "English";
		break;

	default:
		s = "Unknow";
		break;
	}
	cout << s << endl;

	return 0;
}

你可能感兴趣的:(Win_C++,Windows)